TeamCity 2019.1 Help

Role and Permission

User access levels are handled by assigning different roles to users thus granting them respective permissions.

A permission is an authorization to perform particular operations, for example, to run a build or modify build configuration settings.
A role is a set of permissions that can be granted to a user in one or all projects thus controlling access to the projects and various features in the Web UI.

On this page:

Authorization Mode

TeamCity authorization supports two modes: simple and per-project.

  • In the simple mode, there are only three types of authorization levels: guest, logged-in user, and administrator.

  • In the per-project mode, you can assign users roles in projects or server-wide. The set of permissions in roles is editable.

Permissions within a role granted at the project level are automatically propagated in all the subprojects of this project.
The View project and all parent projects permission allows viewing not only the project (with its subprojects) but its parent projects too.

Changing Authorization Mode

Unless explicitly configured, the simple authorization mode is used in TeamCity Professional and per-project is used in TeamCity Enterprise.
To change the authorization mode, go to Administration | Authentication and enable/disable the Enable per-project permissions option.

Simple Authorization Mode

Role

Description

Administrator

User with no restrictions; corresponds to the System Administrator role in the per-project authorization mode.

Logged-in user

Corresponds to the default Project Developer role granted for all projects in the per-project authorization mode.

Guest user

Corresponds to the default Project Viewer role granted for all projects in the per-project authorization mode.

Per-Project Authorization Mode

Roles are assigned to users by administrators on a per-project basis: a user can have different roles in different projects, and hence, the permissions are project-based. A user can have a role in a specific project or in all available projects, or no roles at all. You can associate a user account with a set of roles. A role can also be granted to a user group. This means that the role is automatically granted to all the users that are included into the group (both directly or through other groups).

You can add roles and assign permissions to them in Administration | Roles. Click Add permission under any role to see the list of all available permissions, select a required permission, and click Add. To add multiple permissions, hold the CTRL key when selecting them.

By default, TeamCity provides the following per-project roles:

Role

Description

System Administrator

Has no restrictions in permissions, and has all of the Project Administrator's permissions. –°an create and manage user accounts, authorize build agents, set up projects and build configurations, edit the TeamCity server settings, manage TeamCity licenses, configure server data clean-up rules, change VCS roots, and so on.

Project Viewer

Has read-only access to projects and can only view the project, its parent, and subprojects. Does not have permissions to view agent details.

Project Administrator

Can customize general settings of a project and settings of build configurations, assign roles to the project users, create subprojects. Has all the Project Developer's permissions.

Prior to TeamCity 10, this role included the Agent Manager role.
Since TeamCity 10, project-level agent management permissions replace the inherited Agent Manager role. If old settings (set prior to TeamCity 10) are preserved in your TeamCity installation after upgrade to version 10 or later, we recommend excluding the Agent Manager role from the Project Administrator role manually and configuring agent management permissions instead.

Project developer

Usually commits changes to a project. Can start/stop builds, reorder builds in the build queue, label the build sources, review agent details, start investigation of a failed build.

Agent manager

Can customize and manage Build Agents, change the run configuration policy, enable/disable build agents, and pause/resume build queue.

Prior to TeamCity 10.0, this role was included into the Project Administrator role. Since TeamCity 10, project-level agent management permissions have been introduced.

When per-project permissions are enabled, server administrators can modify the roles, delete them, or add new roles with any combination of permissions right in the TeamCity Administration web UI, or by modifying the roles-config.xml file stored in the <TeamCity Data Directory>/config directory. When assigning roles to users, the View role permissions link in the web UI displays the list of permissions for each role in accordance with their current configuration.

Project-level Agent Management Permissions

TeamCity has the following project-level permissions to perform a task on an agent:

  • Enable/disable agents associated with project

  • Start/Stop cloud agent for project

  • Change agent run configuration policy for project

  • Administer project agent machines (for example, reboot, view agent logs)

  • Remove project agent

  • Authorize project agent

All project-level agent management permissions are by default added to the Project Administrator role.

A user can perform a task controlled by one of these permissions on all the agents belonging to some pool provided this permission is granted to the user in all the projects associated with this pool. For example, a user with the "Enable/disable agents associated with project" permission granted in some projects can enable or disable agents which belong to the pools of the related projects if the permission is granted in all the projects associated with the pools.


See also:

Concepts: User Account
Administrator's Guide: Enabling Guest Login | Managing Users and User Groups