summaryrefslogtreecommitdiffstats
path: root/keystone/token
diff options
context:
space:
mode:
authorAdam Young <ayoung@redhat.com>2013-03-06 11:47:33 -0500
committerAdam Young <ayoung@redhat.com>2013-03-06 11:47:33 -0500
commit26ecdca88845a56e7d2793db76484cbcc5f6fa85 (patch)
tree1badf5d0ea3d511d5030c426d6b59dd941363b9b /keystone/token
parent1f7c863a9ce3df695fbc98c3a53f0e6b4d172e4d (diff)
downloadkeystone-26ecdca88845a56e7d2793db76484cbcc5f6fa85.tar.gz
keystone-26ecdca88845a56e7d2793db76484cbcc5f6fa85.tar.xz
keystone-26ecdca88845a56e7d2793db76484cbcc5f6fa85.zip
Change exception raised to Forbidden on trust_id
Change-Id: I30f89d52ade45335d2f29b8454438d0dd3b20a97
Diffstat (limited to 'keystone/token')
-rw-r--r--keystone/token/controllers.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/keystone/token/controllers.py b/keystone/token/controllers.py
index ade2af4f..23ee11ae 100644
--- a/keystone/token/controllers.py
+++ b/keystone/token/controllers.py
@@ -170,8 +170,8 @@ class Auth(controller.V2Controller):
#A trust token cannot be used to get another token
if 'trust' in old_token_ref:
- raise exception.Unauthorized()
- if 'trust_id' in old_token_ref["metadata"]:
+ raise exception.Forbidden()
+ if 'trust_id' in old_token_ref['metadata']:
raise exception.Forbidden()
user_ref = old_token_ref['user']
@@ -202,7 +202,6 @@ class Auth(controller.V2Controller):
current_user_ref = trustee_user_ref
else:
- tenant_id = self._get_project_id_from_auth(context, auth)
current_user_ref = self.identity_api.get_user(context=context,
user_id=user_id)