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:
- For group access requests
- 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)
- Current: Limit emails to 10 most recently active owners.
- For project access requests:
- For personal projects (projects in users personal namespace):
- Previously: Emails to all project maintainers
- Current: Limit emails to 10 most recently active project maintainers.
- For projects inside a group:
- If the project has its own maintainers
- Previously: Emails to all project maintainers
- Current: Limit emails to 10 most recently active project maintainers.
- If the project does not have any maintainers
- Previously: Fallback to sending emails to its groups owners + maintainers
- Current: Fallback to sending emails to its group's 10 most recently active owners.
- If the project has its own maintainers
- For personal projects (projects in users personal namespace):
Screenshots
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry for user-facing changes, or community contribution. Check the link for other scenarios. -
Documentation created/updated or follow-up review issue created -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides - [-] Separation of EE specific content
Performance and Testing
Edited by Mayra Cabrera