Adding check for service roles to match users region selection
Change-Id: Ic84ba02f3245800156011b015c757333678eaa40 Fixes: bug #1212358
This commit is contained in:
@@ -192,7 +192,10 @@ class KeystoneBackend(object):
|
||||
role_perms = set(["openstack.roles.%s" % role['name'].lower()
|
||||
for role in user.roles])
|
||||
service_perms = set(["openstack.services.%s" % service['type'].lower()
|
||||
for service in user.service_catalog])
|
||||
for service in user.service_catalog
|
||||
if user.services_region in
|
||||
[endpoint.get('region', None) for endpoint
|
||||
in service.get('endpoints', [])]])
|
||||
return role_perms | service_perms
|
||||
|
||||
def has_perm(self, user, perm, obj=None):
|
||||
|
||||
Reference in New Issue
Block a user