When DELETING a user, warn Admin user is part of an on-call schedule
Problem to Solve
Being on-call is a critical function. Users plan their lives around being on-call, making themselves available to respond to incidents in real-time.
When someone is in an on-call schedule, we need to be mindful of what happens when:
- A user is removed from a project
- A user is removed from a Group
- A user is deactivated in GitLab as a whole
If a User is in an on-call schedule when one of the above events occurs, it will put their on-call response team and the services they are responsible for at risk of downtime.
The scope of this issue is to update the warning modal for DELETING a user
The detail for what happens when a user is removed is captured in #323631 (closed)
Proposal
Add details to the existing modal that warns Admins of consequences when removing a user from a project or group or deleting them altogether.
- Admin goes to DELETE a user
- Check is that user is part of an on-call schedule
- If so, surface details in the warning modal that state that User X is part of on-call schedules in Project Z
- Admin can still execute action if need be
Text for warning modal:
**Delete User X?**
You are about to permanently delete User X. Issues, merge requests, and groups linked to them will be transferred to a system-wide "ghost user".
User X is currently part of:
- On-call schedule A in project Y
To avoid data loss, consider using the block user feature instead. Once you Delete User, it cannot be undone or recovered.
To confirm, type `User X`.
Current Delete Modal looks like this: