Skip to content

Allow users to toggle notifications for access level changes at the group/project levels

What does this MR do?

Fixes #20147 (closed) by allowing users to toggle notifications for when their user's permission level changes in a group and or project.

Are there points in the code the reviewer needs to double check?

  • How I'm getting the notification setting for the user. I'm currently using user.global_notification_setting, but I think that doesn't cover the case where the global setting differs from what has been explicitly set at the project or group level.
  • I initially used user.notification_settings_for(self.group) to get the setting specific to that group
    • But when that user had the group setting pointing to the global setting, and the global setting is custom, the list of custom events were all false (despite the global setting having some set to true)
      • Maybe I'm doing something wrong here or the notification_settings_for method isn't doing what I think it should do (and maybe I'm wrong in that thought)

Why was this MR needed?

See #20147 (closed)

What are the relevant issue numbers?

Screenshots (if relevant)

  • New toggle options:

Does this MR meet the acceptance criteria?

  • CHANGELOG entry added
    • I'll add this after the version/milestone is selected
  • Documentation created/updated
  • API support added
    • This issue only covers the UI support. API support is being tracked here: #19359 (closed)
  • Tests
    • Added for this feature/bug
    • All builds are passing
      • ATM, there's a build running after I squashed commits. Before then, it had passed, so it should do the same. We'll see.
  • Conform by the style guides
  • Branch has no merge conflicts with master (if you do - rebase it please)
  • Squashed related commits together

Merge request reports