问题
I create a SonarQube group sonar-administrators-ldap and mapped to LDAP sonar-administrators-ldap. Users under sonar-administrators-ldap are able to login successfully.
When navigate to http://localhost:9000/roles/global, it only shows two default groups: Anyone and sonar-administrators, but not the new sonar-administrators-ldap group.
How do I grant/revoke global permissions for groups other the default groups?
回答1:
To create additional groups(similar to "sonar-administrators") with admin permissions.
Create a new Group with the same name as displayed in your AD.Restart the sonar to pick up the changes.Grant the new group admin permissions using the sonar API.
curl -X POST -v -u admin:Password 'http://mysonar/api/permissions/add_group?permission=admin&groupName=mynewgroup'
回答2:
You can use sonarqube global permission UI, but it's not intuitive at all. The Global Permissions (https://my.sonar.com/admin/permissions) page shows you only groups that have been granted any permissions already.
In order to be able to add permission to existing groups, you need to search it, for example:
Only then the group will appear and you will be able to add the desired permission.
来源:https://stackoverflow.com/questions/39982391/grant-group-global-permissions-similar-to-sonar-administrators