Fix: fail with 403 when user not allowed to archive query.

This commit is contained in:
Arik Fraimovich 2015-01-25 17:30:10 +02:00
parent cddc00e2cc
commit febf9939c8

View File

@ -349,7 +349,7 @@ class QueryAPI(BaseResource):
if q.user.id == self.current_user.id or self.current_user.has_permission('admin'):
q.archive()
else:
self.delete_others_query(query_id)
abort(403)
else:
abort(404, message="Query not found.")