Manage User Roles
Security Requirements and Controls
Manage users
permission
Manage user-specific roles and permissions within an organization's security settings, including creating new roles and assigning or unassigning them to individual users. Users with the "Manage users" permission can access these controls through the Organization Settings menu, where they can view existing permissions, edit role assignments, and create custom roles with specific permission sets for granular access control.
You can create a user specific role in order to grant a single user additional permissions. You can also unassign a role from a user.
User roles are roles added directly to users, in contrast to group roles, where the user is given permissions via group membership.
Edit a User Role
To review or edit a user's roles, do the following:
Start by clicking on the profile menu icon and select Organization Settings →
Users
.Next, click the name of the user to view or edit from the list.
Click the Permissions tab to view a list of all the repositories on which the user has permissions. Select the name of the Repository or View for a detailed list of the user's permissions and roles on that specific repository or view.
Then click in Role Source to change the roles assigned or to create a new role to assign to the user. You may need to switch between the user's roles to be able to edit or create a new role.
Figure 63. Edit User Role
To apply a new role for the user, select a role and click Apply role.
Figure 64. Change User Role
To edit a role with the GraphQL API, use the updateRole() mutation. To get a list of roles with GraphQL, use the roles() query. To unassign a user from a role for a search domain, use the unassignUserRoleForSearchDomain() mutation.
Add a New User Role
At the end of the section above, there are only a couple more steps to create a new user role while viewing an exising user role. However, to start from the beginning, follow the steps below:
Click on the profile menu icon and select Organization Settings →
Users
. Now select a user for which you want to create a new user role.Under the Permissions tab, select any role. Then click the + button next to the role you're viewing and a dialog box will appear with the user's existing roles.
Next, click the + Create new button, located at the bottom left. See the screenshot below:
Figure 65. New Role for User
Specify a name for the new role and select the permissions to grant. When you're done, click Create role.
Now select the new role and click Apply role to assign it to the user.
To create a role with the GraphQL API, use the createRole() mutation. To get a list of roles with GraphQL, use the roles() query.