diff options
author | asteroide <thomas.duval@orange.com> | 2015-07-27 16:58:49 +0200 |
---|---|---|
committer | asteroide <thomas.duval@orange.com> | 2015-07-27 16:58:49 +0200 |
commit | a37d21fd1c5176b445d6e0159521c66d11759e4f (patch) | |
tree | 1e39ed34758ff9e85f7ca42d22c5bc1be3548791 /keystone-moon/keystone/contrib | |
parent | fa131608c47e4dfd1c5c78f09d00439401a8499c (diff) |
Add more log in authz function. (untested)
Change-Id: Iae7323a1865bc61f72107e9e8521c6d1a237ccb6
Diffstat (limited to 'keystone-moon/keystone/contrib')
-rw-r--r-- | keystone-moon/keystone/contrib/moon/core.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/keystone-moon/keystone/contrib/moon/core.py b/keystone-moon/keystone/contrib/moon/core.py index e7d606c6..daf6cd28 100644 --- a/keystone-moon/keystone/contrib/moon/core.py +++ b/keystone-moon/keystone/contrib/moon/core.py @@ -396,6 +396,7 @@ class IntraExtensionManager(manager.Manager): """ authz_buffer = self.__get_authz_buffer(intra_extension_id, subject_id, object_id, action_id) decision_buffer = dict() + decision = False meta_rule_dict = self.driver.get_sub_meta_rules_dict(intra_extension_id) @@ -412,9 +413,10 @@ class IntraExtensionManager(manager.Manager): self.driver.get_rules_dict(intra_extension_id, sub_meta_rule_id).values()) if meta_rule_dict['aggregation'] == 'all_true': - return all_true(decision_buffer) - - return False + decision = all_true(decision_buffer) + if not decision: + raise AuthzException() + return decision @enforce("read", "intra_extensions") def get_intra_extensions_dict(self, user_id): @@ -1499,7 +1501,6 @@ class IntraExtensionAuthzManager(IntraExtensionManager): super(IntraExtensionAuthzManager, self).__init__() def authz(self, tenant_name, subject_name, object_name, action_name, genre="authz"): - # TODO (dthom) add moon log """Check authorization for a particular action. :return: True or False or raise an exception """ |