Add check to prevent banning paid users

What does this MR do and why?

This MR adds a check to prevent paid users from being banned. Since banning may result in destructive actions, we want to ensure that this does not happen to our paid users.

References

Please include cross links to any resources that are relevant to this MR. This will give reviewers and future readers helpful context to give an efficient review of the changes introduced.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After
image image

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Run GDK in SaaS mode
    export GITLAB_SIMULATE_SAAS=1
  2. Add a user as a member to a group with an ultimate license.
  3. In the admin area, attempt to ban the user.
  4. You should see an error that says you cannot ban paid users.
  5. Remove the user from the paid group. You should now be able to ban the user.

Related to #523499 (closed)

Edited by Ian Anderson

Merge request reports

Loading