Adding specific users as project members

Issue: Adding users to specific project roles to narrow their access and abilities within the project

I created a new GitLab “group / project”. My account is the designated default “Owner / Maintainer” of the group / project. I now want to select “specific” user accounts to have specific roles. All I see at the project level branch permissions are the roles: developer+maintainer, maintainer, owner, or none

The same scenario above applies to the “group” permission settings.

I really want to fine tune the access to a specific user account names. Is this possible?
I was also wondering if it were possible to manage the branch protections to permit or protect the branch from a push, merge, or being deleted.

Versions: GitLab Enterprise Edition 17.6.0-pre 45ee705265a

Please add an x whether options apply, and add the version information.

  • [x ] Self-managed
  • GitLab.com SaaS
  • Dedicated

I really want to fine tune the access to a specific user account names. Is this possible?

In GitLab EE Free and GitLab CE, branch protection settings are limited to Maintainers (default) Developers + Maintainers, and No one.

In GitLab Premium and Ultimate, you can also add groups or individual users to Allowed to merge and Allowed to push and merge .

GitLab Premium and Ultimate has a CODEOWNERS feature that can be used to require approval from designated users for any changes made to specific files.

I was also wondering if it were possible to manage the branch protections to permit or protect the branch from a push, merge, or being deleted.

Protected branch settings can be configured to block merges and pushes to protected branches for anyone lacking the required permissions.

Only project owners and maintainers can delete protected branches. Protected branches | GitLab

1 Like

Thanks. Next question that comes to mind. What are the operational differences between the developer and maintainer roles? More specifically, can the “developer” role members do the following:

  • change branch permission settings
  • change repository permission settings
  • delete branches
  • change commit history
  • create new project repositories within the group

As GitLab uses the docs-first methodology, the answers to these questions (and more) can be found in our documentation here:

  • change branch permission settings
  • change repository permission settings

Maintainers and Owners can change protected branch/tag settings

Maintainers and owners can also edit project settings

  • delete branches

Developers, Maintainers, and Owners can create or delete branches that are not protected.

Only Maintainers and Owners can delete protected branches.

Source: https://docs.gitlab.com/ee/user/permissions.html#repository

  • change commit history

Developers, Maintainers, and Owners can add or ammend commits in Git history. Rewriting git history requires force pushing, and by default nobody can force push to protected branches. https://docs.gitlab.com/ee/user/project/repository/branches/protected.html#allow-force-push-on-a-protected-branch

  • create new project repositories within the group

By default, Developers, Maintainers, and Owners can create projects in a group. This can also be controlled at the instance and group level.

2 Likes