Search in sources :

Example 1 with PermissionsService

use of org.sonarqube.ws.client.permission.PermissionsService in project sonarqube by SonarSource.

the class OrganizationTest method addPermissionsToUser.

private void addPermissionsToUser(String orgKeyAndName, String login, String permission, String... otherPermissions) {
    PermissionsService permissionsService = ItUtils.newAdminWsClient(orchestrator).permissions();
    permissionsService.addUser(new AddUserWsRequest().setLogin(login).setOrganization(orgKeyAndName).setPermission(permission));
    for (String otherPermission : otherPermissions) {
        permissionsService.addUser(new AddUserWsRequest().setLogin(login).setOrganization(orgKeyAndName).setPermission(otherPermission));
    }
}
Also used : AddUserWsRequest(org.sonarqube.ws.client.permission.AddUserWsRequest) PermissionsService(org.sonarqube.ws.client.permission.PermissionsService)

Aggregations

AddUserWsRequest (org.sonarqube.ws.client.permission.AddUserWsRequest)1 PermissionsService (org.sonarqube.ws.client.permission.PermissionsService)1