Merge "Remove unused test case"

This commit is contained in:
Jenkins 2015-02-10 04:51:20 +00:00 committed by Gerrit Code Review
commit 3502e56e59
3 changed files with 1 additions and 38 deletions

View File

@ -1114,29 +1114,6 @@ Returns:
}
}
GET /users/{user_id}/roles
==========================
Retrieve the roles granted to a user, given a user ID:
.. code-block:: bash
$ curl -H "X-Auth-Token:999888777666" http://localhost:35357/v2.0/users/4/roles
Returns:
.. code-block:: javascript
{
"roles_links":[],
"roles":[
{
"id":"2",
"name":"KeystoneServiceAdmin"
}
]
}
GET /tokens/revoked
===================

View File

@ -192,7 +192,7 @@ class Role(controller.V2Controller):
# COMPAT(essex-3)
@controller.v2_deprecated
def get_user_roles(self, context, user_id, tenant_id=None):
def get_user_roles(self, context, user_id, tenant_id):
"""Get the roles for a user and tenant pair.
Since we're trying to ignore the idea of user-only roles we're
@ -200,10 +200,6 @@ class Role(controller.V2Controller):
"""
self.assert_admin(context)
if tenant_id is None:
raise exception.NotImplemented(message='User roles not supported: '
'tenant ID required')
roles = self.assignment_api.get_roles_for_user_and_project(
user_id, tenant_id)
return {'roles': [self.role_api.get_role(x)

View File

@ -260,16 +260,6 @@ class CoreApiTests(object):
token=token)
self.assertValidTenantResponse(r)
def test_get_user_roles(self):
# The server responds with a 501 Not Implemented. See bug 933565.
token = self.get_scoped_token()
self.admin_request(
path='/v2.0/users/%(user_id)s/roles' % {
'user_id': self.user_foo['id'],
},
token=token, expected_status=501)
def test_get_user_roles_with_tenant(self):
token = self.get_scoped_token()
r = self.admin_request(