User admin approval - Reject user
Proposal
As part of &4491 , when a user's request to access an instance is rejected they should receive an email letting them know. We currently do this for groups and projects: https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/views/notify/member_access_denied_email.text.erb
Following the discussion here: #257880 (comment 442701950) , it would be good to add a "Reject user"/"Deny user" button on a user page when they're pending approval. Currently pending users can only be:
- Kept in pending state indefinitely
- Approved
- Blocked
- Destroyed
With the new "reject/deny user" button, when an admin goes to a pending user's page, they would see big straightforward buttons for "Approve user" and "Reject user", and it's clear the effect that clicking each button would have.
We could do something like this: #257880 (comment 443433469) , which is the boring solution that repurposes the "Delete user" action and renders a different box if the user is pending approval vs. a regular user. That way we don't have to build out a separate "Deny user" action so the work is pretty limited to frontend.
Email title:
GitLab account request rejected
Email body:
Hi (name),
Your request to join (instance name) has been rejected.
Please (contact your GitLab administrator) if you think this is an error.
---
You're receiving this email because of your activity on (instance name).