Start FreeLog in
SonarQube Cloud | Administering SonarQube Cloud | Managing organization's projects | Managing project permissions | Using permission templates

Managing the project-related permissions through templates

On this page

This feature is available starting in Team plan.

As the organization admin, using permission templates allows you to define:

  • The permissions granted by default to users, groups, project creators, and individual users on new projects. 
  • Different sets of permissions that a project admin can apply to their project at any time.

Introduction to the permission template concept

A permission template defines the project-related permissions granted to groups and members of the organization. 

You can define several permission templates in your organization: 

  • You define the default template.
  • You can define a template that applies to specific projects according to their key pattern by using a regular expression. 

When a new project is created, SonarQube Cloud uses a permission template to grant the default permissions on the project. It retrieves the template according to the following rules:

  • If the project key complies with the project key pattern of a template, then this template is used.
    If several templates comply, an error is raised.
  • Otherwise, the default template is used.

The project admin can then change the permissions if necessary and apply any other template defined for the organization.

Creating a new template

  1. Retrieve the organization.
  2. Go to Administration > Permission Templates. The Permission Templates page opens with the list of templates.
  3. Select the Create button. The Create Permission Template dialog opens.
  4. Enter the template name and description.
  5. If you want to apply the template to specific new projects according to their key, enter the corresponding regular expression in Project key pattern
  6. Select the Create button. The dialog closes and the new template is displayed.
  7. Set the permissions by selecting the respective check boxes.

Setting the default template

  1. Retrieve the organization.
  2. Go to Administration > Permission Templates. The Permission Templates page opens with the list of templates.
  3. Select the three-dot menu to the far right of the template you want to change.
  4. In the menu, select Set Default.

Deleting a template

  1. Retrieve the organization.
  2. Go to Administration > Permission Templates. The Permission Templates page opens with the list of templates.
  3. Select the three-dot menu to the far right of the template you want to delete.
  4. In the menu, select Delete and confirm.

Changing a template

  1. Retrieve the organization.
  2. Go to Administration > Permission Templates. The Permission Templates page opens with the list of templates.
  3. Select the three-dot menu to the far right of the template you want to change.
  4. In the menu:
    • To change the template name, description or patter: select Update Details.
    • To change the template permissions, description or patter: select Edit Permissions.

Applying a permission template to several projects at a time

  1. Retrieve the organization.
  2. Go to Administration > Projects management.
  3. Retrieve and select the projects you want to update.
  4. In the tool bar, select Bulk Apply Permission Template. The Bulk Apply Permission Template dialog opens. 
  5. Select the template and select Apply.

Was this page helpful?

© 2008-2024 SonarSource SA. All rights reserved. SONAR, SONARSOURCE, SONARQUBE, and CLEAN AS YOU CODE are trademarks of SonarSource SA.

Creative Commons License