-
Notifications
You must be signed in to change notification settings - Fork 11.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add event for AccessControl._setRoleAdmin #2210
Comments
That is good, how about the name of this new event is |
We name events as verbs in the past tense, so it'd have to be something like |
@nventuro I would like to tackle this if you are OK. Not sure whats the expected timeline but can take a look during the weekend if required. Can do just the event or also the renaming if we agree. Let me know, just looking on how to contribute :) |
Go for it! The event alone should be fine, it'll be a straightforward PR :) |
@nventuro Just submitted PR. Ran the tests and lintern and seems to be fine. I dont think we have to modify the CHANGELOG. Please let me know how it looks. Thanks! |
As far as I am concerned, the function name is OK, the 'set' also means it can 'change', of course, in order to make it more clear, we can add some comments. |
Whenever a role's admin is set by _setRoleAdmin, we should emit an event indicating this happened.
Not only is this useful to react to admin changes, it will also help in dynamic role schemes, where a role hierarchy may be set up without any account having the roles.
The text was updated successfully, but these errors were encountered: