Skip to content

When deleting or removing a user from a project/group warn admin that user is assigned to escalation rule in escalation policy

Context

Removing or deleting a user from a project or group can impact escalation policy rules which directly notify a user of alerts. This should be handled similarly to #323631 (closed), which addressed the similar requirements for on-call schedules.

Plan

  1. Include escalation policies in the list in the existing modal, adding one for each policy that has rules which direct alerts directly to the affected user.
  2. Send an email to all project/group owner when user is removed/leaves (comparable to the one added in #323631 (closed))
  3. When a user is deleted/removed/leaves, delete the corresponding escalation rule (same as #323631 (closed)).
Modal updates

Add details to the existing modal that warns Admins of consequences when removing a user from a project or group or deleting them altogether.

  1. Admin goes to DELETE a user or REMOVE him from project or group members
  2. Check that user is assigned to the escalation rule in some of the escalation policies. In the case of the specific project/group - only escalation policies within it
  3. If so, surface details in the warning modal that state that User X is part of the escalation policy in Project Z
  4. Admin can still execute an 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
**- TODO TEXT FOR ESCALATION POLICIES**

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 modal:

Screenshot_2021-07-01_at_15.04.59

Q&A

  1. Q: Should we replace the on-call schedules with escalation policies in the modal, since we could include any rules which point to on-call schedules that the user is part of?
    • A: No, let's provide the full detail for schedules.
  2. Q: Should we exclude schedules which are not part of an escalation policy?
    • A: No, let's provide the full detail for schedules.
  3. Q: #323631 (closed) didn't include any string updates for a legacy pop-up which occurs when users leaving a project/group from the Project information page. Should that be in scope?
    • A: No, migrating to the vue modal or altering the message not strictly necessary, as the important piece is notifying to project/group owners.
  4. Q [out of scope]: When schedules are removed, the escalation rule is removed. But if all rules are removed from a policy, the policy should remain. If removing a user results in all participants being removed from a rotation, should the rotation remain? A: Yes, this allows maintainers to replace/make any adjustments to the rotation that they might want to.
Edited by Sarah Yasonik