Skip to content
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

Adds user permission events. #12146

Merged
merged 4 commits into from
Oct 18, 2022

Conversation

brianjhanson
Copy link
Contributor

Description

Adds UserPermissions::EVENT_AFTER_SAVE_USER_PERMISSIONS and UserPermission::EVENT_AFTER_SAVE_GROUP_PERMISSIONS to notify plugins when permissions have been changed either on a group or user level.

UserPermissions::EVENT_AFTER_SAVE_USER_PERMISSIONS receives the userId associated with the user as well as an array of the permissions being updated.

UserPermissions::EVENT_AFTER_SAVE_GROUP_PERMISSIONS receives the groupId associated with the change along with an array of the permissions being updated.

Related issues

#12130

Adds `UserPermissions::EVENT_AFTER_SAVE_USER_PERMISSIONS` and `UserPermission::EVENT_AFTER_SAVE_GROUP_PERMISSIONS` to notify plugins when permissions have been changed either on a group or user level.

`UserPermissions::EVENT_AFTER_SAVE_USER_PERMISSIONS` receives the `userId` associated with the user as well as an array of the permissions being updated.

`UserPermissions::EVENT_AFTER_SAVE_GROUP_PERMISSIONS` receives the `groupId` associated with the change along with an array of the permissions being updated.

#12130
@brianjhanson brianjhanson requested a review from a team as a code owner October 18, 2022 14:00
@linear
Copy link

linear bot commented Oct 18, 2022

DEV-1023 UserPermissions service events

saveUserPermissions() and saveGroupPermissions() should each have events that trigger before return true.

EVENT_AFTER_SAVE_USER_PERMISSIONS:

  • UserPermissionsEvent with $userId and $permissions properties

EVENT_AFTER_SAVE_GROUP_PERMISSIONS:

  • UserGroupPermissionsEvent with $groupId and $permissions properties

@brandonkelly brandonkelly merged commit 2cddec5 into 4.3 Oct 18, 2022
@brandonkelly brandonkelly deleted the feature/dev-1023-userpermissions-service-events branch October 18, 2022 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants