Skip to content

Check group member permissions in GroupMentionService

What does this MR do and why?

Fixes https://gitlab.com/gitlab-org/gitlab/-/issues/425067 by checking group member access to the context of a group mention, before sending a group mention notification.

How to set up and validate locally

  1. Enabled the :group_mention_access_check feature flag.
  2. Create a Slack Incoming Webhook to receive notifications (https://github.com/darklynx/request-baskets works great).
  3. Create a Public group called slack-notifications-test-group and configure Slack notifications with the webhook and both A group is mentioned... triggers enabled.
  4. Add a non-admin user to slack-notifications-test-group with Reporter permissions.
  5. Create a Public project (outside of slack-notifications-test-group).
  6. Mention @slack-notifications-test-group in a public issue in the project. A Slack notification should arrive.
  7. Mention @slack-notifications-test-group in a confidential issue in the project. No Slack notification should arrive.
  8. Remove the non-admin user with the Reporter permissions from @slack-notifications-test-group.
  9. Mention @slack-notifications-test-group in a confidential issue in the project. A Slack notification should arrive.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Ash McKenzie

Merge request reports

Loading