From b7edc999729bc59a2a3abe7efbb5dbbccfa05c99 Mon Sep 17 00:00:00 2001 From: Victor Sergeyev Date: Thu, 1 Aug 2013 15:56:14 +0300 Subject: 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 --- openstack/common/policy.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'openstack') 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 -- cgit