From ff03c7de81ce64678188dffc23fe82adf68917c3 Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Tue, 7 Feb 2017 11:55:39 +0100 Subject: Add param "organization" to ws-client PermissionsService --- .../org/sonarqube/ws/client/permission/AddUserWsRequest.java | 11 +++++++++++ .../sonarqube/ws/client/permission/PermissionsService.java | 4 +++- 2 files changed, 14 insertions(+), 1 deletion(-) (limited to 'sonar-ws/src/main') diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/AddUserWsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/AddUserWsRequest.java index 5e416337ce8..9e9e8030baa 100644 --- a/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/AddUserWsRequest.java +++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/AddUserWsRequest.java @@ -29,6 +29,7 @@ public class AddUserWsRequest { private String permission; private String projectId; private String projectKey; + private String organization; public String getLogin() { return login; @@ -67,4 +68,14 @@ public class AddUserWsRequest { this.projectKey = projectKey; return this; } + + @CheckForNull + public String getOrganization() { + return organization; + } + + public AddUserWsRequest setOrganization(@Nullable String s) { + this.organization = s; + return this; + } } diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/PermissionsService.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/PermissionsService.java index a0a53cf8427..022a83fe46f 100644 --- a/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/PermissionsService.java +++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/PermissionsService.java @@ -36,6 +36,7 @@ import static org.sonarqube.ws.client.permission.PermissionsWsParameters.PARAM_G import static org.sonarqube.ws.client.permission.PermissionsWsParameters.PARAM_GROUP_NAME; import static org.sonarqube.ws.client.permission.PermissionsWsParameters.PARAM_ID; import static org.sonarqube.ws.client.permission.PermissionsWsParameters.PARAM_NAME; +import static org.sonarqube.ws.client.permission.PermissionsWsParameters.PARAM_ORGANIZATION; import static org.sonarqube.ws.client.permission.PermissionsWsParameters.PARAM_PERMISSION; import static org.sonarqube.ws.client.permission.PermissionsWsParameters.PARAM_PROJECT_ID; import static org.sonarqube.ws.client.permission.PermissionsWsParameters.PARAM_PROJECT_KEY; @@ -85,7 +86,8 @@ public class PermissionsService extends BaseService { .setParam(PARAM_USER_LOGIN, request.getLogin()) .setParam(PARAM_PERMISSION, request.getPermission()) .setParam(PARAM_PROJECT_ID, request.getProjectId()) - .setParam(PARAM_PROJECT_KEY, request.getProjectKey())); + .setParam(PARAM_PROJECT_KEY, request.getProjectKey()) + .setParam(PARAM_ORGANIZATION, request.getOrganization())); } public void addUserToTemplate(AddUserToTemplateWsRequest request) { -- cgit v1.2.3