Get assignments with names honors inheritance flag

When listing role assignments with the ?include_names option,
the inheritance flag was not honored.

This change fixes that behavior and enables the test that was
submitted in the parent patch.

Co-Authored-By: Samuel de Medeiros Queiroz <samueldmq@gmail.com>

Closes-Bug: #1625230

Change-Id: Ic0d32f3e47ee82015d86cec8b7502a440b66c021
This commit is contained in:
Kanika Singh 2016-10-03 13:49:37 +05:30 committed by Samuel de Medeiros Queiroz
parent aa531a001a
commit b9890f8120
2 changed files with 2 additions and 2 deletions

View File

@ -986,6 +986,8 @@ class Manager(manager.Manager):
new_assign['role_domain_name'] = (
self.resource_api.get_domain(_role['domain_id'])
['name'])
elif id_type == 'inherited_to_projects':
new_assign['inherited_to_projects'] = id_
role_assign_list.append(new_assign)
return role_assign_list

View File

@ -23,7 +23,6 @@ import keystone.conf
from keystone import exception
from keystone.tests import unit
from keystone.tests.unit import test_v3
from keystone.tests.unit import utils as test_utils
CONF = keystone.conf.CONF
@ -1709,7 +1708,6 @@ class AssignmentInheritanceTestCase(test_v3.RestfulTestCase,
self._test_list_role_assignments_include_names(role)
@test_utils.wip('Blocked by bug #1625230')
def test_list_inherited_role_assignments_include_names(self):
"""Call ``GET /role_assignments?include_names``.