summaryrefslogtreecommitdiffstats
path: root/keystone/common/controller.py
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2013-05-30 05:05:48 +0000
committerGerrit Code Review <review@openstack.org>2013-05-30 05:05:48 +0000
commit6d33805d0fe7fd7bd75765ee4167eb64fbdd324b (patch)
tree109952b6569d4aa3e7db02af3eb60f7de2516713 /keystone/common/controller.py
parentd67e31b70ca648c8ca0a3cb76f421b3be257d4c5 (diff)
parent3c3f5dc8973a28fcded50bdb65b7cd77cd772cc6 (diff)
downloadkeystone-6d33805d0fe7fd7bd75765ee4167eb64fbdd324b.tar.gz
keystone-6d33805d0fe7fd7bd75765ee4167eb64fbdd324b.tar.xz
keystone-6d33805d0fe7fd7bd75765ee4167eb64fbdd324b.zip
Merge "Move auth_token middleware from admin user to an RBAC policy"
Diffstat (limited to 'keystone/common/controller.py')
-rw-r--r--keystone/common/controller.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/keystone/common/controller.py b/keystone/common/controller.py
index 9c28f081..3452f85e 100644
--- a/keystone/common/controller.py
+++ b/keystone/common/controller.py
@@ -87,7 +87,7 @@ def flatten(d, parent_key=''):
def protected(f):
"""Wraps API calls with role based access controls (RBAC)."""
@functools.wraps(f)
- def wrapper(self, context, **kwargs):
+ def wrapper(self, context, *args, **kwargs):
if 'is_admin' in context and context['is_admin']:
LOG.warning(_('RBAC: Bypassing authorization'))
else:
@@ -100,7 +100,7 @@ def protected(f):
self.policy_api.enforce(context, creds, action, flatten(kwargs))
LOG.debug(_('RBAC: Authorization granted'))
- return f(self, context, **kwargs)
+ return f(self, context, *args, **kwargs)
return wrapper