summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorasteroide <thomas.duval@orange.com>2015-09-08 14:43:58 +0200
committerasteroide <thomas.duval@orange.com>2015-09-08 14:43:58 +0200
commit62bfb49d6936c534735a727f7f4cdeaa1ad4b460 (patch)
tree7b6ece7661a7788e1d29d09a4bec52b8d3e160e6
parent312b1702ee332a2b8d71d88f849b55d8242fe45b (diff)
Add_tenant can now be used even if the tenant ID is unknown.
Change-Id: I623483c99a349bd1ccc3b5b88c3973ce28dfd633
-rw-r--r--keystone-moon/keystone/contrib/moon/core.py4
1 files changed, 3 insertions, 1 deletions
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: