From 62bfb49d6936c534735a727f7f4cdeaa1ad4b460 Mon Sep 17 00:00:00 2001 From: asteroide Date: Tue, 8 Sep 2015 14:43:58 +0200 Subject: Add_tenant can now be used even if the tenant ID is unknown. Change-Id: I623483c99a349bd1ccc3b5b88c3973ce28dfd633 --- keystone-moon/keystone/contrib/moon/core.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/keystone-moon/keystone/contrib/moon/core.py b/keystone-moon/keystone/contrib/moon/core.py index cf15b6ff..8916e2bd 100644 --- a/keystone-moon/keystone/contrib/moon/core.py +++ b/keystone-moon/keystone/contrib/moon/core.py @@ -198,7 +198,9 @@ def enforce(action_names, object_name, **extra): # id is in fact a tenant id so, we must check against the Root intra_extension intra_extension_id = intra_root_extension_id else: - raise IntraExtensionUnknown() + # id is not a known tenant ID, so we must check against the Root intra_extension + intra_extension_id = intra_root_extension_id + LOG.warning("Cannot enforce because the intra-extension is unknown ({})".format(intra_extension_id)) try: tenants_dict = self.tenant_api.driver.get_tenants_dict() except AttributeError: -- cgit 1.2.3-korg