diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2017-02-07 11:55:39 +0100 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2017-02-07 14:30:45 +0100 |
commit | ff03c7de81ce64678188dffc23fe82adf68917c3 (patch) | |
tree | 69ca567452e4c390e8e465af82d13d1ca19b9158 /sonar-ws/src/main | |
parent | cdc24875d5f53501231be806f4a81adf8e5b335e (diff) | |
download | sonarqube-ff03c7de81ce64678188dffc23fe82adf68917c3.tar.gz sonarqube-ff03c7de81ce64678188dffc23fe82adf68917c3.zip |
Add param "organization" to ws-client PermissionsService
Diffstat (limited to 'sonar-ws/src/main')
-rw-r--r-- | sonar-ws/src/main/java/org/sonarqube/ws/client/permission/AddUserWsRequest.java | 11 | ||||
-rw-r--r-- | sonar-ws/src/main/java/org/sonarqube/ws/client/permission/PermissionsService.java | 4 |
2 files changed, 14 insertions, 1 deletions
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) { |