Remove unnecessary revocation events
With [0], we no longer need role_assignment callback. It isn't being used anywhere and token providers rebuild tokens at validation time. Some links to show test coverage for role_assignment: https://github.com/openstack/keystone/blob/master/keystone/tests/unit/test_auth.py#L526-L553 https://github.com/openstack/keystone/blob/master/keystone/tests/unit/test_v3_auth.py#L2993 https://github.com/openstack/keystone/blob/master/keystone/tests/unit/test_v3_auth.py#L3179 https://github.com/openstack/keystone/blob/master/keystone/tests/unit/test_v3_auth.py#L3329 https://github.com/openstack/keystone/blob/master/keystone/tests/unit/test_v3_auth.py#L3610 https://github.com/openstack/keystone/blob/master/keystone/tests/unit/test_v3_assignment.py#L31-L33 [0]: https://review.openstack.org/#/c/447562/ Change-Id: If690c8ff8466e8568a8c9dc4463f341adb675630 partial-bug: 1671887
This commit is contained in:
parent
6ed141a57c
commit
890b1d4325
|
@ -102,13 +102,6 @@ class Manager(manager.Manager):
|
|||
self.revoke(
|
||||
revoke_model.RevokeEvent(consumer_id=payload['resource_info']))
|
||||
|
||||
def _role_assignment_callback(self, service, resource_type, operation,
|
||||
payload):
|
||||
info = payload['resource_info']
|
||||
self.revoke_by_grant(role_id=info['role_id'], user_id=info['user_id'],
|
||||
domain_id=info.get('domain_id'),
|
||||
project_id=info.get('project_id'))
|
||||
|
||||
def _register_listeners(self):
|
||||
callbacks = {
|
||||
notifications.ACTIONS.deleted: [
|
||||
|
@ -116,7 +109,6 @@ class Manager(manager.Manager):
|
|||
['OS-OAUTH1:consumer', self._consumer_callback],
|
||||
['user', self._user_callback],
|
||||
['project', self._project_callback],
|
||||
['role_assignment', self._role_assignment_callback]
|
||||
],
|
||||
notifications.ACTIONS.disabled: [
|
||||
['user', self._user_callback],
|
||||
|
|
Loading…
Reference in New Issue