Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add custom user roles for a GitHub organisation?

There are two default user roles in an organization on GitHub: "admin" and "member".

GitHub organization user roles

How to introduce a further role and configure its access rights?

like image 261
automatix Avatar asked May 26 '16 13:05

automatix


2 Answers

The roles cannot be customized and you cannot create new roles. Instead, you should group people into teams and organize permissions that way.

Additionally, on a per-user basis you can…

  • make someone a team maintainer, which grants additional permissions to a user with the Member role
  • configure per-repo permissions, which can be granted to either an individual member or a team in your organization

Finally, there is a third role you may be interested in: billing manager.

like image 71
Aaron Brager Avatar answered Oct 02 '22 19:10

Aaron Brager


If you are using GHE (GitHub for Enterprise), you can "introduce a further role and configure its access rights"

Only since Oct. 2021:

Enterprise organizations can now create custom repository roles:

Organizations using GitHub Enterprise Cloud now have more granular control over the repository access permissions they can grant to users, with custom repository roles – now available in Beta.

A custom repository role is created by an organization owner, and is available across all repositories in that organization.
Each role can be given a custom name, and a description. It can be configured from a set of over 40 fine-grained permissions.
Once created, repository admins can assign a custom role to any user, team or outside collaborator in their repository.

Custom repository roles can be created, viewed, edited and deleted via the new Repository roles tab in Organization settings.

Screenshot 2021-10-25 at 12 59 46 PM

Custom repository roles are also fully supported in the GitHub REST APIs.
The Organizations API can be used to list all custom repository roles in an organization, and the existing APIs for granting repository access to individuals and teams have been extended to support custom repository roles.

To get started with custom repository roles, read the docs.

like image 30
VonC Avatar answered Oct 02 '22 19:10

VonC