From 92579d80451f329a807a20acfb1686599f85cec4 Mon Sep 17 00:00:00 2001 From: asteroide Date: Mon, 12 Oct 2015 16:45:10 +0200 Subject: Check the content of tenant_dict['intra_admin_extension_id'] to allow or not the synchronisation process. Change-Id: Iba22a1ae8444f2367272ef68b8310b5bff7c2b0c --- keystone-moon/keystone/contrib/moon/core.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'keystone-moon') diff --git a/keystone-moon/keystone/contrib/moon/core.py b/keystone-moon/keystone/contrib/moon/core.py index 4f8074f7..f1bba652 100644 --- a/keystone-moon/keystone/contrib/moon/core.py +++ b/keystone-moon/keystone/contrib/moon/core.py @@ -413,8 +413,9 @@ class TenantManager(manager.Manager): keystone_tenant = self.__get_keystone_tenant_dict(tenant_dict['id'], tenant_dict['name']) tenant_dict.update(keystone_tenant) # Sync users between intra_authz_extension and intra_admin_extension - if 'intra_admin_extension_id' in tenant_dict: - if 'intra_authz_extension_id' in tenant_dict: + self.moonlog_api.debug("add_tenant_dict {}".format(tenant_dict)) + if 'intra_admin_extension_id' in tenant_dict and tenant_dict['intra_admin_extension_id']: + if 'intra_authz_extension_id' in tenant_dict and tenant_dict['intra_authz_extension_id']: # authz_subjects_dict = self.admin_api.get_subjects_dict(self.root_api.get_root_admin_id(), tenant_dict['intra_authz_extension_id']) # admin_subjects_dict = self.admin_api.get_subjects_dict(self.root_api.get_root_admin_id(), tenant_dict['intra_admin_extension_id']) # for _subject_id in authz_subjects_dict: -- cgit 1.2.3-korg