From 96b64eb53379794fedc0eb8aefd77e8b679b9c19 Mon Sep 17 00:00:00 2001
From: Megan Henning <meganhenning@flywheel.io>
Date: Tue, 3 May 2016 13:40:01 -0500
Subject: [PATCH] containerauth should pass all params

---
 api/auth/containerauth.py   | 4 +++-
 api/dao/containerstorage.py | 3 ++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/api/auth/containerauth.py b/api/auth/containerauth.py
index 49db4e39..6934527d 100644
--- a/api/auth/containerauth.py
+++ b/api/auth/containerauth.py
@@ -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
diff --git a/api/dao/containerstorage.py b/api/dao/containerstorage.py
index 8e59c89c..05d34957 100644
--- a/api/dao/containerstorage.py
+++ b/api/dao/containerstorage.py
@@ -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)
-- 
GitLab