Skip to content

How to Manage Access to a Project

In Teamscale access to a project is controlled by assigning a project role to a user or group. The concept of roles in Teamscale is also explained in this article. A role is assigned for a specific project and grants the permissions of the role to the user or groups members

Roles can be assigned to users or groups on the role assignment page of the project. First, navigate to the Projects perspective. Here, we assume that you already created a project. In the list of projects click the edit role assignments button () for the target project. The top section of the role assignment page shows the currently configured project roles (see screenshot below). Click on the role to see detailed information about the permissions granted by each role. Below the available roles the section for assigning roles to users or groups for the current project follows.

Role Assignment Page

Roles can be assigned to users or groups on the role assignment page of the analysis profile. First, navigate to the Analysis Profiles page of the Projects perspective. Here, we assume that you already created an analysis profile for which you want to control access for. In the list of analysis profiles click the edit role assignments button () for the analysis profile you would like to assign roles for. The top section of the role assignment page for the analysis shows the basic roles:

Available Project Roles Section

Available Project Roles Section

Click on the role to see detailed information about the permissions granted by each role. Below the available roles the section for assigning roles to users or groups for the current analysis profile follows on the role assignment page.

Example: Granting Project Access to Developers

Assume that a group with all users you want to have developer access for a project already exists. In our example we use the role Developer, which is included in Teamscale by default. It just contains the project permission View Project which allows users or group members to view the project in project-specific perspectives like the Activity perspective.

  1. First, navigate to the role assignment page for the project as described here.

  2. To assign the role to your group click the button Select User or Group .

  3. Select a user or group you would like to assign a role for from the dropdown menu:

    Role Assignment Dialog

  4. Next, we choose the project role by clicking the button + Select Role to assign .

  5. We pick the role Developer from the dropdown menu:

    Role Dropdown

  6. After selection the UI shows that changes to role assignments have occurred:

    Role Assignments Save

  7. To apply the changes we press the Save button. After saving the changes all users in the group CQSE Developers now have the permissions of the Developer role for the project.

Example: Granting a Build User with limited Access to all Projects

This section describes how to grant simple build access to all projects configured in Teamscale to a build user. We assume you already created a build user to which you would like to grant access.

  1. Navigate to the role assignment page of any project you created. For providing build level access to the project we use the Build role included in the pre-configured project roles of Teamscale. It allows external uploads and trigger of commits hooks for a project.
  2. Add the role Build for the build user as described in the previous example.
  3. Before saving the changes check the checkbox for the Global column in the row of the added role assignment.
  4. Press the Save button.

This global role assignment now applies to all projects stored in Teamscale. Note that the build user can’t view any project via the Web UI. Hence access to code in the Teamscale UI is not possible if you login as the build user.

Example: Allowing a User to Edit an Analysis Profile

This section describes how to allow another user to edit an analysis profile. Assume that a user to which you would like to grant access for an analysis profile already exists. First, navigate to the role assignment page for the analysis profile as described here.

In our example, we want to allow a single user to view and edit an analysis profile. For that purpose we assign the basic role Editor to the user for the analysis profile. To assign the role to your group click the button Select User or Group . Select a user or group you would like to assign a role for from the dropdown menu:

Choosing user or group

In our example we select the user Andi Scharfstein. Next, we choose the role by clicking the button + Select Role to assign. We pick the role Editor from the dropdown menu:

Choosing user or group

After selection the UI shows that changes to role assignments have occurred as depicted here:

Assigning a Basic Role for Analysis Profiles

To apply the changes, we press the Save button. After saving the changes the user Andi Scharfstein has the permissions of the Editor role for the analysis profile.

Example: Allowing Users to Create a Project

This section describes how to allow a group of users to create projects, analysis profiles and metric threshold configurations. For this example a group called Project Managers was created. It contains all users which should be able to create projects in Teamscale. First, navigate to the role assignment page for the group Project Managers as outlined here.

Next, click the button + Select a global role. From the dropdown menu, choose the role Project Creator.

Choosing user or group

The Project Creator role is one of the default global roles included in Teamscale and grants the global permissions to create projects, analysis profiles and metric threshold configurations. After selecting the role the UI informs you that changes to role assignments have occurred:

Assigning Global Role

To apply the role assignment press the Save button. After saving the assignment the members of group Project Managers have the permissions of the Project Creator role.