diff options
author | Teryk Bellahsene <teryk.bellahsene@sonarsource.com> | 2016-07-08 15:21:36 +0200 |
---|---|---|
committer | Stas Vilchik <vilchiks@gmail.com> | 2016-07-12 10:16:53 +0200 |
commit | d806714e36a891e767c4e6bdba3d3d3dab772156 (patch) | |
tree | 88205b743d604d212f1d244bca37c66527f9258c /sonar-ws | |
parent | 2990ede97d1cedfd256869ab448dcd2864d7a6df (diff) | |
download | sonarqube-d806714e36a891e767c4e6bdba3d3d3dab772156.tar.gz sonarqube-d806714e36a891e767c4e6bdba3d3d3dab772156.zip |
SONAR-7835 Delete old permissions.UsersAction
Diffstat (limited to 'sonar-ws')
3 files changed, 2 insertions, 43 deletions
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 697747e8219..db7965e791f 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 @@ -21,7 +21,6 @@ package org.sonarqube.ws.client.permission; import org.sonarqube.ws.WsPermissions; import org.sonarqube.ws.WsPermissions.CreateTemplateWsResponse; -import org.sonarqube.ws.WsPermissions.OldUsersWsResponse; import org.sonarqube.ws.WsPermissions.SearchProjectPermissionsWsResponse; import org.sonarqube.ws.WsPermissions.SearchTemplatesWsResponse; import org.sonarqube.ws.WsPermissions.UpdateTemplateWsResponse; @@ -214,19 +213,8 @@ public class PermissionsService extends BaseService { .setParam(PARAM_PROJECT_KEY_PATTERN, request.getProjectKeyPattern()), UpdateTemplateWsResponse.parser()); } - public OldUsersWsResponse oldUsers(OldUsersWsRequest request) { - return call(new GetRequest(path("users")) - .setParam(PARAM_PERMISSION, request.getPermission()) - .setParam(PARAM_PROJECT_ID, request.getProjectId()) - .setParam(PARAM_PROJECT_KEY, request.getProjectKey()) - .setParam("selected", request.getSelected()) - .setParam("p", request.getPage()) - .setParam("ps", request.getPageSize()) - .setParam("q", request.getQuery()), OldUsersWsResponse.parser()); - } - public UsersWsResponse users(UsersWsRequest request) { - return call(new GetRequest(path("users2")) + return call(new GetRequest(path("users")) .setParam(PARAM_PERMISSION, request.getPermission()) .setParam(PARAM_PROJECT_ID, request.getProjectId()) .setParam(PARAM_PROJECT_KEY, request.getProjectKey()) diff --git a/sonar-ws/src/main/protobuf/ws-permissions.proto b/sonar-ws/src/main/protobuf/ws-permissions.proto index ceb2a559dad..bbe40511eb4 100644 --- a/sonar-ws/src/main/protobuf/ws-permissions.proto +++ b/sonar-ws/src/main/protobuf/ws-permissions.proto @@ -26,15 +26,13 @@ option java_package = "org.sonarqube.ws"; option java_outer_classname = "WsPermissions"; option optimize_for = SPEED; -// WS api/permissions/users for internal use only -// and WS api/permissions/template_users for internal use only +// WS api/permissions/template_users for internal use only message OldUsersWsResponse { optional sonarqube.ws.commons.Paging paging = 1; repeated OldUser users = 2; } // WS api/permissions/users for internal use only -// and WS api/permissions/template_users for internal use only message UsersWsResponse { optional sonarqube.ws.commons.Paging paging = 1; repeated User users = 2; diff --git a/sonar-ws/src/test/java/org/sonarqube/ws/client/permission/PermissionsServiceTest.java b/sonar-ws/src/test/java/org/sonarqube/ws/client/permission/PermissionsServiceTest.java index d0e4e0a52e6..f430c5dd5f8 100644 --- a/sonar-ws/src/test/java/org/sonarqube/ws/client/permission/PermissionsServiceTest.java +++ b/sonar-ws/src/test/java/org/sonarqube/ws/client/permission/PermissionsServiceTest.java @@ -22,7 +22,6 @@ package org.sonarqube.ws.client.permission; import org.junit.Rule; import org.junit.Test; import org.sonarqube.ws.WsPermissions; -import org.sonarqube.ws.WsPermissions.OldUsersWsResponse; import org.sonarqube.ws.client.GetRequest; import org.sonarqube.ws.client.PostRequest; import org.sonarqube.ws.client.ServiceTester; @@ -431,32 +430,6 @@ public class PermissionsServiceTest { } @Test - public void users_does_GET_on_Ws_users() { - underTest.oldUsers(new OldUsersWsRequest() - .setPermission(PERMISSION_VALUE) - .setProjectId(PROJECT_ID_VALUE) - .setProjectKey(PROJECT_KEY_VALUE) - .setSelected(SELECTED_VALUE) - .setPage(PAGE_VALUE) - .setPageSize(PAGE_SIZE_VALUE) - .setQuery(QUERY_VALUE) - ); - - assertThat(serviceTester.getGetParser()).isSameAs(OldUsersWsResponse.parser()); - GetRequest getRequest = serviceTester.getGetRequest(); - serviceTester.assertThat(getRequest) - .hasPath("users") - .hasParam(PARAM_PERMISSION, PERMISSION_VALUE) - .hasParam(PARAM_PROJECT_ID, PROJECT_ID_VALUE) - .hasParam(PARAM_PROJECT_KEY, PROJECT_KEY_VALUE) - .hasParam(PARAM_SELECTED, SELECTED_VALUE) - .hasParam(PARAM_P, PAGE_VALUE) - .hasParam(PARAM_PS, PAGE_SIZE_VALUE) - .hasParam(PARAM_Q, QUERY_VALUE) - .andNoOtherParam(); - } - - @Test public void add_project_creator_to_template() { underTest.addProjectCreatorToTemplate(AddProjectCreatorToTemplateWsRequest.builder() .setPermission(PERMISSION_VALUE) |