How to add custom user roles for a GitHub organisation?
Asked Answered
L

3

11

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?

Leicester answered 26/5, 2016 at 13:30 Comment(1)
Custom roles are now (June 2022) a reality on GitHub. See my answer below.Trihydric
H
6

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.

Hangeron answered 26/5, 2016 at 13:35 Comment(0)
T
2

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.

Trihydric answered 29/10, 2021 at 16:1 Comment(0)
T
2

The roles cannot be customized and you cannot create new role

Update June 2022: you can.

Custom repository roles are now GA

Custom repository roles are now GA for GitHub.com and Enterprise Server 3.5.

Organization admins can create custom repository roles available to all repositories in their organization.

Roles can be configured from a set of 35 fine grained permissions covering discussions, issues, pull requests, repos, and security alerts.
Once a role is created, repository admins can assign a custom role to any individual or team in their repository.

Custom repository roles can be managed in the Repository roles tab of your Organization settings:

image

Custom repository roles are also supported in the GitHub REST APIs.
The Custom Roles 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 support custom repository roles.

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

Trihydric answered 6/6, 2022 at 21:41 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.