diff options
Diffstat (limited to 'keystone-moon')
-rw-r--r-- | keystone-moon/keystone/contrib/moon/core.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/keystone-moon/keystone/contrib/moon/core.py b/keystone-moon/keystone/contrib/moon/core.py index a227174c..0560d464 100644 --- a/keystone-moon/keystone/contrib/moon/core.py +++ b/keystone-moon/keystone/contrib/moon/core.py @@ -1883,13 +1883,15 @@ class IntraExtensionAuthzManager(IntraExtensionManager): super(IntraExtensionAuthzManager, self).del_subject(user_id, intra_extension_id, subject_id) tenants_dict = self.tenant_api.get_tenants_dict(self.root_api.get_root_admin_id()) for tenant_id in tenants_dict: - if tenants_dict[tenant_id]["intra_authz_extension_id"] == intra_extension_id: + if tenants_dict[tenant_id]["intra_authz_extension_id"] == intra_extension_id and \ + tenants_dict[tenant_id]["intra_admin_extension_id"]: subject_id = self.driver.get_uuid_from_name(tenants_dict[tenant_id]["intra_admin_extension_id"], subject_name, self.driver.SUBJECT) self.driver.del_subject(tenants_dict[tenant_id]["intra_admin_extension_id"], subject_id) break - if tenants_dict[tenant_id]["intra_admin_extension_id"] == intra_extension_id: + if tenants_dict[tenant_id]["intra_admin_extension_id"] == intra_extension_id and \ + tenants_dict[tenant_id]["intra_authz_extension_id"]: subject_id = self.driver.get_uuid_from_name(tenants_dict[tenant_id]["intra_authz_extension_id"], subject_name, self.driver.SUBJECT) @@ -2046,13 +2048,15 @@ class IntraExtensionAdminManager(IntraExtensionManager): super(IntraExtensionAdminManager, self).del_subject(user_id, intra_extension_id, subject_id) tenants_dict = self.tenant_api.get_tenants_dict(self.root_api.get_root_admin_id()) for tenant_id in tenants_dict: - if tenants_dict[tenant_id]["intra_authz_extension_id"] == intra_extension_id: + if tenants_dict[tenant_id]["intra_authz_extension_id"] == intra_extension_id and \ + tenants_dict[tenant_id]["intra_admin_extension_id"]: subject_id = self.driver.get_uuid_from_name(tenants_dict[tenant_id]["intra_admin_extension_id"], subject_name, self.driver.SUBJECT) self.driver.del_subject(tenants_dict[tenant_id]["intra_admin_extension_id"], subject_id) break - if tenants_dict[tenant_id]["intra_admin_extension_id"] == intra_extension_id: + if tenants_dict[tenant_id]["intra_admin_extension_id"] == intra_extension_id and \ + tenants_dict[tenant_id]["intra_authz_extension_id"]: subject_id = self.driver.get_uuid_from_name(tenants_dict[tenant_id]["intra_authz_extension_id"], subject_name, self.driver.SUBJECT) |