Skip to content

Add Remove Group custom ability

Alex Buijs requested to merge add-remove_group-custom-ability into master

What does this MR do and why?

This adds "Remove group" as a custom role ability, so that it can be added onto any base role.

Issue: #425962 (closed)

Screenshots or screen recordings

Group member with custom role with base access level Guest and the remove_group ability:

As admin As custom role user
Screenshot_2024-02-21_at_17.40.51 Screenshot_2024-02-21_at_17.28.21

How to set up and validate locally

  1. As admin:
    1. create a group and a subgroup and apply the Ultimate license to the top level group
    2. If SaaS mode is:
    3. Invite a user to the group and assign the new custom role to the user
  2. As the new group member with custom access:
    1. Visit http://localhost:3000/groups/#{new_group}/#{new_subgroup}/-/edit and verify the page is accessible and you can delete and restore the group
    2. Verify you can delete and restore the group via REST API:
      • Delete: curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "http://localhost:3000/api/v4/groups/#{new_subgroup_id}"
      • Restore: curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "http://localhost:3000/api/v4/groups/#{new_subgroup_id}/restore"
Edited by Alex Buijs

Merge request reports