Skip to content
Snippets Groups Projects
Commit 96b64eb5 authored by Megan Henning's avatar Megan Henning
Browse files

containerauth should pass all params

parent 540fd1cb
No related branches found
No related tags found
No related merge requests found
......@@ -48,8 +48,10 @@ def default_container(handler, container=None, target_parent_container=None):
if has_access and projection:
return exec_op(method, _id=_id, payload=payload, projection=projection)
if has_access and recursive:
return exec_op(method, _id=_id, payload=payload, recursive=recursive, r_payload=r_payload, replace_metadata=replace_metadata)
elif has_access:
return exec_op(method, _id=_id, payload=payload)
return exec_op(method, _id=_id, payload=payload, replace_metadata=replace_metadata)
else:
handler.abort(403, 'user not authorized to perform a {} operation on the container'.format(method))
return f
......
......@@ -26,11 +26,12 @@ class ContainerStorage(object):
def exec_op(self, action, _id=None, payload=None, query=None, user=None,
public=False, projection=None, recursive=False, r_payload=None,
replace_metadata=True):
replace_metadata=False):
"""
Generic method to exec an operation.
The request is dispatched to the corresponding private methods.
"""
check = consistencychecker.get_container_storage_checker(action, self.cont_name)
data_op = payload or {'_id': _id}
check(data_op)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment