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));
}
}
Aggregations