Merge "Use the domain filter provided by keystoneclient"
This commit is contained in:
commit
5ed79c9435
@ -430,15 +430,7 @@ def group_delete(request, group_id):
|
|||||||
|
|
||||||
def group_list(request, domain=None, project=None, user=None):
|
def group_list(request, domain=None, project=None, user=None):
|
||||||
manager = keystoneclient(request, admin=True).groups
|
manager = keystoneclient(request, admin=True).groups
|
||||||
groups = manager.list(user=user)
|
groups = manager.list(user=user, domain=domain)
|
||||||
# TODO(dklyle): once keystoneclient supports filtering by
|
|
||||||
# domain change this to use that cleaner implementation
|
|
||||||
if domain:
|
|
||||||
domain_groups = []
|
|
||||||
for group in groups:
|
|
||||||
if group.domain_id == domain:
|
|
||||||
domain_groups.append(group)
|
|
||||||
groups = domain_groups
|
|
||||||
|
|
||||||
if project:
|
if project:
|
||||||
project_groups = []
|
project_groups = []
|
||||||
|
Loading…
Reference in New Issue
Block a user