Skip to content

Resolve "Limit access request emails to ten most recently active owners/maintainers"

What does this MR do?

Issue: https://gitlab.com/gitlab-org/gitlab-ce/issues/28643

The "too many addresses in the TO field" problem mentioned in the issue was already solved with https://gitlab.com/gitlab-org/gitlab-ce/issues/42274. Now mails are being sent individually to each owner and maintainer.

The next ask in the issue was to limit the number of emails being sent to 10 owners, but access requests can be made for projects as well (and not just groups) and unlike Groups, projects do not have Owners.

So, the changes I've made are:

  1. For group access requests
    1. Previously: Emails to all owners + maintainers. (These emails to maintainers were essentially not useful because for a group, only owners have access to see and approve access requests)
    2. Current: Limit emails to 10 most recently active owners.
  2. For project access requests:
    1. For personal projects (projects in users personal namespace):
      1. Previously: Emails to all project maintainers
      2. Current: Limit emails to 10 most recently active project maintainers.
    2. For projects inside a group:
      1. If the project has its own maintainers
        1. Previously: Emails to all project maintainers
        2. Current: Limit emails to 10 most recently active project maintainers.
      2. If the project does not have any maintainers
        1. Previously: Fallback to sending emails to its groups owners + maintainers
        2. Current: Fallback to sending emails to its group's 10 most recently active owners.

Screenshots

Does this MR meet the acceptance criteria?

Conformity

Performance and Testing

Edited by Mayra Cabrera

Merge request reports