summaryrefslogtreecommitdiffstats
path: root/openstack
diff options
context:
space:
mode:
authorVictor Sergeyev <vsergeyev@mirantis.com>2013-08-01 15:56:14 +0300
committerVictor Sergeyev <vsergeyev@mirantis.com>2013-08-01 15:56:14 +0300
commitb7edc999729bc59a2a3abe7efbb5dbbccfa05c99 (patch)
treeae2b185f843d674bea9b0a96ddce20b85d038986 /openstack
parent96d1f887dda21b43ba4376187f31953dee6f5273 (diff)
downloadoslo-b7edc999729bc59a2a3abe7efbb5dbbccfa05c99.tar.gz
oslo-b7edc999729bc59a2a3abe7efbb5dbbccfa05c99.tar.xz
oslo-b7edc999729bc59a2a3abe7efbb5dbbccfa05c99.zip
Fix missing argument bug in oslo common policy
AndCheck() and OrCheck() classes in common policy module missing a argument when calls rules in __call__() method. Current patch fixed it by adding the necessary argument. Tests added. Fixed bug 1194354 Change-Id: I9a6e7d04b06ef61216cb7dbfd291c855b799b621
Diffstat (limited to 'openstack')
-rw-r--r--openstack/common/policy.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/openstack/common/policy.py b/openstack/common/policy.py
index 02335ca..3a3c63f 100644
--- a/openstack/common/policy.py
+++ b/openstack/common/policy.py
@@ -404,7 +404,7 @@ class AndCheck(BaseCheck):
"""
for rule in self.rules:
- if not rule(target, cred):
+ if not rule(target, cred, enforcer):
return False
return True
@@ -447,7 +447,7 @@ class OrCheck(BaseCheck):
"""
for rule in self.rules:
- if rule(target, cred):
+ if rule(target, cred, enforcer):
return True
return False