Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to enable automatic Project Permissions for Sonar-Users / User-Groups

Tags:

sonarqube

i know that i can create User-Groups and add people in here ("Settings" -> Security Section -> "Groups").

When I go now to "Project Permissions" and than to the tab "Pattern" I am allowed to create some pattern. I can edit the Pattern Name and wich users / user groups are Administrators, Users or Code Viewers in this pattern.

If I switch now back to the projects tab, i can search for Views and Projects, add Permissions for users and usergroups manually or selcet "apply permission template" which will change the settings to the same once like the pattern has got.

A small example:

Let's say i have to different groups of users. The first group should only be allowed to see code from Project meeting requirements A (e.g. name contains an "A"). The secound group is only allowed to see code from projects containing a name with "B" in it.

I can now create the user groups "A-codeviewers" and "B-codeviewers", create templates "A-template" (adding A-codeviewers to the codeviewer section) and "B-template"(adding B-codeviewers to the codeviewer section) and finally select a project -> apply permission template -> A-Template.

My Question: Is there a possibility to make this progress automatically? I looking for something like a place where i cann add a regular expression (RegExp) or something like that and if a project key meets the RegExp a specific pattern is used automatically for this project.

Thanks for your great help :)

like image 339
Krummy Avatar asked Oct 20 '22 08:10

Krummy


1 Answers

Sonar has added a permission template in Jul 2013.

Settings -> Project Permissions -> Permission Templates

The project key pattern takes a regular expression

like image 179
Portalus Avatar answered Oct 24 '22 01:10

Portalus