There is no support for mapping custom roles to groups who may be invited into a project. It is easier to apply these roles to user groups rather than one-by-one for a user.
Why interested: We utilise Azure AD SAML group linking for adding members to team groups, and then share these team groups back up the hierarchy. (Gong call snippet - internal only)
Problem they are trying to solve: They are limited to the standard roles when sharing a group to a project.
Current solution for this problem: None.
Impact to the customer of not having this: Unable to adopt custom roles as it is not compatible with their workflow for delegating access. A key driver for needing custom roles is the "admin vulnerability" permission that was recently removed from the developer built-in role, which their teams require for certain security and compliance workflows.
Questions: @jrandazzo, can you confirm the following? It seems like the current behavior when inviting a group to a group/project is that if the group member has a custom role in the group, they will have the custom role in the group/project invited to as well. Could you confirm if that's the expected behavior for now? (i.e. if we don't turn on the feature flag described in https://docs.gitlab.com/ee/user/custom_roles.html#assign-a-custom-role-to-an-invited-group)
@cbazan1 I believe they are encountering a bug if the feature flag is not turned on. I created an issue to track the experience: #504148. @hmehra Does this bug occur when the feature flag is turned on? cc @eugielimpin in case you stumble in to this.
Group A has member User A with role Developer+read_code
Group B invites Group A and assigns Developer+read_vulnerability role
User A has role Developer+read_code (instead of Developer+read_vulnerability) in Group B
The effect of this can actually be seen in the example scenario above (assuming that is the correct expectation) i.e. Joe will have Developer Lead role in Front-end Project instead of Platform Engineer.
@eugielimpin in that above scenario, User A has the right permission in Group B. If the base access level of the two roles matches, then the role they had in Group A will carry.
Originally, we had the opposite but it resulted in billing issues (because Guest + read_code is not a billable role). So, we had to change this.
@cbazan1 I would recommend turning the assign_custom_roles_to_group_links_sm feature-flag on to resolve the bug. That will take into account custom roles when inviting groups.