"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "keystone/assignment/core.py" between
keystone-15.0.0.tar.gz and keystone-15.0.1.tar.gz

About: OpenStack Keystone (Core Service: Identity) provides an authentication and authorization service for other OpenStack services. Provides a catalog of endpoints for all OpenStack services.
The "Stein" series (maintained release).

core.py  (keystone-15.0.0):core.py  (keystone-15.0.1)
skipping to change at line 59 skipping to change at line 59
"""Default pivot point for the Assignment backend. """Default pivot point for the Assignment backend.
See :class:`keystone.common.manager.Manager` for more details on how this See :class:`keystone.common.manager.Manager` for more details on how this
dynamically calls the backend. dynamically calls the backend.
""" """
driver_namespace = 'keystone.assignment' driver_namespace = 'keystone.assignment'
_provides_api = 'assignment_api' _provides_api = 'assignment_api'
_SYSTEM_SCOPE_TOKEN = 'system' _SYSTEM_SCOPE_TOKEN = 'system' # nosec
_USER_SYSTEM = 'UserSystem' _USER_SYSTEM = 'UserSystem'
_GROUP_SYSTEM = 'GroupSystem' _GROUP_SYSTEM = 'GroupSystem'
_PROJECT = 'project' _PROJECT = 'project'
_ROLE_REMOVED_FROM_USER = 'role_removed_from_user' _ROLE_REMOVED_FROM_USER = 'role_removed_from_user'
_INVALIDATION_USER_PROJECT_TOKENS = 'invalidate_user_project_tokens' _INVALIDATION_USER_PROJECT_TOKENS = 'invalidate_user_project_tokens'
def __init__(self): def __init__(self):
assignment_driver = CONF.assignment.driver assignment_driver = CONF.assignment.driver
super(Manager, self).__init__(assignment_driver) super(Manager, self).__init__(assignment_driver)
skipping to change at line 927 skipping to change at line 927
for assignment in assignments: for assignment in assignments:
a = {} a = {}
if assignment['type'] == self._GROUP_SYSTEM: if assignment['type'] == self._GROUP_SYSTEM:
a['group_id'] = assignment['actor_id'] a['group_id'] = assignment['actor_id']
elif assignment['type'] == self._USER_SYSTEM: elif assignment['type'] == self._USER_SYSTEM:
a['user_id'] = assignment['actor_id'] a['user_id'] = assignment['actor_id']
a['role_id'] = assignment['role_id'] a['role_id'] = assignment['role_id']
a['system'] = {'all': True} a['system'] = {'all': True}
system_assignments.append(a) system_assignments.append(a)
for i, assignment in enumerate(system_assignments): if role_id:
if role_id and role_id != assignment['role_id']: system_assignments = [
system_assignments.pop(i) sa for sa in system_assignments
if role_id == sa['role_id']
]
assignments = [] assignments = []
for assignment in itertools.chain( for assignment in itertools.chain(
project_and_domain_assignments, system_assignments): project_and_domain_assignments, system_assignments):
assignments.append(assignment) assignments.append(assignment)
return assignments return assignments
def list_role_assignments(self, role_id=None, user_id=None, group_id=None, def list_role_assignments(self, role_id=None, user_id=None, group_id=None,
system=None, domain_id=None, project_id=None, system=None, domain_id=None, project_id=None,
 End of changes. 2 change blocks. 
4 lines changed or deleted 6 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)