Notifications for group owners when someone applies to become a group or project member
## Problem There is a tab in the group membership screen showing "Access requests" that appears when a request is generated , but that is the only interaction. The group owner would have to know to go to that section to look for members who want to join. | User request | User withdraw | Group owner screen | |--------------|---------------|--------------------| | ![Screen_Shot_2022-03-24_at_11.38.56_AM](https://gitlab.com/gitlab-org/gitlab/uploads/e720c136e043590b8021f7a2f2afe774/Screen_Shot_2022-03-24_at_11.38.56_AM.png) | ![Screen_Shot_2022-03-24_at_11.39.04_AM](https://gitlab.com/gitlab-org/gitlab/uploads/39cf58cbb812ed5e2d00ec5986a3c904/Screen_Shot_2022-03-24_at_11.39.04_AM.png) | ![Screen_Shot_2022-03-24_at_11.38.15_AM](https://gitlab.com/gitlab-org/gitlab/uploads/45f9603b3d644a4152372c1ebff4cf74/Screen_Shot_2022-03-24_at_11.38.15_AM.png) | ## Solution proposal * Create a new object in the `To-dos` * Limit sending the `User requested access` email to the [10, most recently active group owners](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/32141) similar to what we do for emails * Link `To-do` line item to the `Group`/`Members`/`Access requests` screen * What happens to the todo item presented to `Group Owner B`, when `Group Owner A` has already rejected the member? * In this case, the todo items for all group owners will simply vanish as that `member` record does not exist in the database anymore. * The notifications appear when a user applies to become a group member or a project member * If the requestor withdraws the access request, todo items sent to owners of groups and projects are deleted ![Frame_1](https://gitlab.com/gitlab-org/gitlab/uploads/ade11c6f46e1cbe31df427006f875ec9/Frame_1.png) Looking at the to-dos we would need to: * Use requester's avatar * Link to group (should go to the `Members`/ `Access requests` tab * Add supplementary text: - If we can include a link in the text to bring the user to the `Access requests`, I have this suggestion: ``` [Review access request](link-to-access-request-tab). ``` - If a link isn't possible, then I have this suggestion, although I'm much more in favour of using a link to bring users to the location: ``` To review this access request, go to **Groups > Group information > Members**. [Learn more](link-to-docs). ``` ### Availability and Testing - E2E tests will be added to support this feature in https://gitlab.com/gitlab-org/gitlab/-/issues/368308+
epic