Wrong role when creating project from template
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Summary
We are using a custom role (let's call it "my-maintainer") to augment the maintainer role with additional privileges. When creating a project from an instance template we see some unexpected behavior.
When a user with the "my-maintainer" role creates a project from an instance template the user gets added to the project directly with the standard base role "maintainer" - not with the "my-maintainer" custom role. So the user now has less privileges on the newly created project than the user should have based on the assigned "my-maintainer" role in the group containing the project. This is counterintuitive and contradicts the inheritance of roles in gitlab.
As a simple workaround the user can choose to "leave" the newly created project on the members page. This deletes the direct project membership with the role "maintainer" in the project and "reactivates" the inherited "my-maintainer" role from the group.
However, when creating an empty project (not from a template) the user does not get a role assignment within the project, so the inherited role from the groups applies.
Steps to reproduce
- Create a custom instance role "my-maintainer" that is based on the maintainer base role.
- Assign the "my-maintainer" role to a user in a group.
- Let this user create a project from an instance template.
What is the current bug behavior?
GitLab wrongly assigns the "maintainer" role in a newly created project (from instance template) although the user has the "my-maintainer" role in the containing group.
What is the expected correct behavior?
GitLab should not assign a role at all in the project - as it does when creating an empty project.