Can we disable notifications for user permission level changes?
Summary
We'd like to disable notifications for when a user's permission level is changed at the group and or project level.
~"feature proposal"
Related Code
- Here's the NotificationSetting model
- Perhaps at a custom permission level, we could enable/disable notifications for the permission change event
- Here's the code that sends an email when a group member's permission level changes
- Here's the code that sends an email when a project member's permission level changes
- This is the NotificationService that handles email sending for various events
- Maybe more events in here should be added to the EMAIL_EVENTS constant in the NotificationSetting model
UI/UX
- The "Show" view of a user's notifications settings
- The partial allowing a user to configure their custom notifications
Extent of Work
- It looks like the UI code doesn't need to change as the list of events are fetched from the NotificationSetting model
- The change_project_access_level and change_group_access_level events need to be added to the NotificationSetting model
- Once that's in place we just need to update the conditions here to account for the custom permissions setting at the group-level and project-level.
-
For example (for group-level):
def post_update_hook if access_level_changed? and self.user.notification_settings_for(self.group).events[:change_group_access_level] notification_service.update_group_member(self) end super end
-