Managing permissions
As a System Administrator, you can grant users and groups global permissions and you can manage the default project permissions.
As a System Administrator, you can grant users and groups global permissions (permissions not related to a project) and you can manage the project-related permissions granted by default when a new project is created.
Setting the global permissions
Changing the default visibility of new projects
By default, any newly created project will be public. It means every SonarQube user, authenticated or not, will be able to:
Browse: Access a project, browse its measures and issues, and perform some issue edits (confirm, assign, comment).
See Source Code: View the project’s source code.
To change the default visibility of new projects:
In the top navigation bar, go to Administration > Projects > Management.
In the top right corner of the page, select the pen icon near Default visibility of new projects. The Set Default Visibility of New Projects dialog opens.
Select Public or Private.
Select Change default visibility.
Permissions related to a project
Permission Templates
A permission template defines the project-related permissions granted to groups and members of the organization.
As a System Administrator, 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 Server 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.
Managing project-related permissions through templates
As a System Administrator, using permission templates allows you to define:
Different sets of permissions that can be applied to a project by a project admin.
The permissions granted by default to users, groups, and project creators on new projects, new applications, or new portfolios (starting in Enterprise edition).
Restoring administrator access to SonarQube Server
If you lost global administrator access to SonarQube Server, you can restore it by executing the following queries directly in your database. You can:
Regrant the global Administer System permission to an existing user.
Reactivate and/or reset the password of the built-in
adminaccount
Related pages
Last updated
Was this helpful?

