Update assigned custom role to a group invited to a project
What does this MR do and why?
This MR implements displaying and updating the custom role assigned to a group that was invited to a project.
References
This MR implements:
- Update frontend to display custom role assigned... (#506678 - closed); and
- Update frontend to allow updating assigned cust... (#506679 - closed)
Parts of Assign custom role when sharing a project to a ... (#468329).
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
Display assigned custom role to a group invited to a project
| Before | After |
|---|---|
![]() |
![]() |
Update assigned custom role to a group invited to a project
Screen_Recording_2024-12-02_at_2.49.51_PM
How to set up and validate locally
-
Start GDK with
GITLAB_SIMULATE_SAAS=1$ export GITLAB_SIMULATE_SAAS=1 $ gdk start -
Enable required feature flags
$ rails c > Feature.enable(:assign_custom_roles_to_group_links_saas) > Feature.enable(:assign_custom_roles_to_project_links_saas) -
Login with
rootuser and generate a PAT withapiscope -
Visit a group and create two custom roles (e.g. http://localhost:9393/flightjs/)
-
With a project under the group in 3 (e.g. http://localhost:9393/flightjs/Flight/), send an API request to share the project to another group (e.g. http://localhost:9393/gitlab-org) with the new custom role
$ curl --request POST --header "Content-Type: application/json" --data '{"group_access": 10, "group_id": <share_with_group_id>, "member_role_id": <custom_role_id>}' --header "PRIVATE-TOKEN: <root_user_access_token>" "localhost:9393/api/v4/projects/<project_id>/share"Note:
group_accessvalue should be the same as the baseaccess_levelof the custom role you created (e.g. if you selected Guest,group_accessshould be10) -
Visit the
Project members pageof the shared group -
Verify that the custom role assigned to the group can be updated

