User Groups
User groups provide a reusable, hierarchical way to grant access in Gitea Enterprise. Instead of adding the same users to every team or repository individually, administrators can define a group once, add members, and assign the group to organization teams or repositories.
User groups are available in Gitea Enterprise v26 and later. Repository collaborator user groups were added in Gitea Enterprise v27.
Enable user groups
Section titled “Enable user groups”- Open
Site Administration > User Groups. - Check Enable user groups.
- Save the setting.
When user groups are enabled, the user-group management pages, LDAP user-group synchronization settings, team user-group sections, and repository collaborator controls are shown. Disabling the feature hides all user-group related UI and routes.
Create and manage groups
Section titled “Create and manage groups”- Open
Site Administration > User Groups. - Click New User Group.
- Enter a Name and, optionally, a Description.
- Optionally choose a Parent group to build a hierarchy.
- Leave Slug empty to derive it from the name, or enter a stable lowercase identifier using letters, numbers, dots, underscores, and hyphens.
- Click Create Group.
From a group’s edit page you can:
- add or remove individual members
- create or view child groups
- review which organization teams use the group
Hierarchy and effective members
Section titled “Hierarchy and effective members”User groups can be nested. A child group includes its own direct members and the effective members inherited from its parent groups. When a user group is assigned to a team or repository, all effective members of the group receive that access.
Assign groups to organization teams
Section titled “Assign groups to organization teams”- Open the organization’s
Teamspage and select a team. - Open the User Groups section.
- Click Add User Group and select one or more groups.
Members inherited through child user groups are included in the team. Removing a member from the source user group removes the access granted through that team.
Assign groups to repositories
Section titled “Assign groups to repositories”Starting in Gitea Enterprise v27, repository administrators can assign user groups as repository collaborators:
- Open
Repository > Settings > Collaborators. - In the User Groups section, search for and add a user group.
- Choose the access mode: read, write, or admin.
The selected group’s effective members receive that access on the repository. You can change or remove a repository user group from the same page.
Synchronize LDAP groups to user groups
Section titled “Synchronize LDAP groups to user groups”User groups can be synchronized from an LDAP authentication source:
- Open
Site Administration > Identity & Access > Authentication Sourcesand edit the LDAP source. - Set LDAP Group Synchronization Mode to Synchronize groups to user groups.
- Configure the group unique ID, name, description, parent detection strategy, and sync interval.
- Save the authentication source, then choose Sync LDAP User Groups Now to run an initial synchronization.
The synchronization creates and updates user groups and their members from the directory. The last synchronization status is shown on the authentication source page.
Availability
Section titled “Availability”User groups were introduced in Gitea Enterprise v26. Repository collaborator user groups were added in Gitea Enterprise v27.