aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>2015-06-03 15:39:08 +0200
committerJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>2015-06-03 15:42:19 +0200
commita7143f7130f38a79cde27dbb3fd632ae1cc79df3 (patch)
tree8593540f1c5573cd4e1ea558721a00ca9f46a72f /server
parent48f25de92c75da5f802c3d2702a2f2ef8e76d6ab (diff)
downloadsonarqube-a7143f7130f38a79cde27dbb3fd632ae1cc79df3.tar.gz
sonarqube-a7143f7130f38a79cde27dbb3fd632ae1cc79df3.zip
SONAR-6476 SONAR-6477 Revert to id instead of groupId for consistency with other user groups WS
Diffstat (limited to 'server')
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/usergroups/ws/AddUserAction.java4
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/usergroups/ws/RemoveUserAction.java4
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/usergroups/ws/AddUserActionTest.java24
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/usergroups/ws/RemoveUserActionTest.java20
-rw-r--r--server/sonar-web/src/main/js/apps/groups/users-view.js4
-rw-r--r--server/sonar-web/src/main/js/apps/users/groups-view.js4
6 files changed, 30 insertions, 30 deletions
diff --git a/server/sonar-server/src/main/java/org/sonar/server/usergroups/ws/AddUserAction.java b/server/sonar-server/src/main/java/org/sonar/server/usergroups/ws/AddUserAction.java
index 8753ff40025..8be62d8cb24 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/usergroups/ws/AddUserAction.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/usergroups/ws/AddUserAction.java
@@ -37,8 +37,8 @@ import static org.sonar.core.persistence.MyBatis.closeQuietly;
public class AddUserAction implements UserGroupsWsAction {
- private static final String PARAM_ID = "groupId";
- private static final String PARAM_LOGIN = "userLogin";
+ private static final String PARAM_ID = "id";
+ private static final String PARAM_LOGIN = "login";
private final DbClient dbClient;
private final UserSession userSession;
diff --git a/server/sonar-server/src/main/java/org/sonar/server/usergroups/ws/RemoveUserAction.java b/server/sonar-server/src/main/java/org/sonar/server/usergroups/ws/RemoveUserAction.java
index b8fc4d863b1..ab5a72fd278 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/usergroups/ws/RemoveUserAction.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/usergroups/ws/RemoveUserAction.java
@@ -36,8 +36,8 @@ import static org.sonar.core.persistence.MyBatis.closeQuietly;
public class RemoveUserAction implements UserGroupsWsAction {
- private static final String PARAM_ID = "groupId";
- private static final String PARAM_LOGIN = "userLogin";
+ private static final String PARAM_ID = "id";
+ private static final String PARAM_LOGIN = "login";
private final DbClient dbClient;
private final UserSession userSession;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/usergroups/ws/AddUserActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/usergroups/ws/AddUserActionTest.java
index 84d69569aef..db56d1a1afd 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/usergroups/ws/AddUserActionTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/usergroups/ws/AddUserActionTest.java
@@ -97,8 +97,8 @@ public class AddUserActionTest {
userSession.login("admin").setGlobalPermissions(GlobalPermissions.SYSTEM_ADMIN);
tester.newPostRequest("api/usergroups", "add_user")
- .setParam("groupId", group.getId().toString())
- .setParam("userLogin", user.getLogin())
+ .setParam("id", group.getId().toString())
+ .setParam("login", user.getLogin())
.execute()
.assertNoContent();
@@ -116,8 +116,8 @@ public class AddUserActionTest {
userSession.login("admin").setGlobalPermissions(GlobalPermissions.SYSTEM_ADMIN);
tester.newPostRequest("api/usergroups", "add_user")
- .setParam("groupId", admins.getId().toString())
- .setParam("userLogin", user.getLogin())
+ .setParam("id", admins.getId().toString())
+ .setParam("login", user.getLogin())
.execute()
.assertNoContent();
@@ -134,8 +134,8 @@ public class AddUserActionTest {
userSession.login("admin").setGlobalPermissions(GlobalPermissions.SYSTEM_ADMIN);
tester.newPostRequest("api/usergroups", "add_user")
- .setParam("groupId", users.getId().toString())
- .setParam("userLogin", user.getLogin())
+ .setParam("id", users.getId().toString())
+ .setParam("login", user.getLogin())
.execute()
.assertNoContent();
@@ -153,8 +153,8 @@ public class AddUserActionTest {
userSession.login("admin").setGlobalPermissions(GlobalPermissions.SYSTEM_ADMIN);
tester.newPostRequest("api/usergroups", "add_user")
- .setParam("groupId", users.getId().toString())
- .setParam("userLogin", user2.getLogin())
+ .setParam("id", users.getId().toString())
+ .setParam("login", user2.getLogin())
.execute()
.assertNoContent();
@@ -172,8 +172,8 @@ public class AddUserActionTest {
userSession.login("admin").setGlobalPermissions(GlobalPermissions.SYSTEM_ADMIN);
tester.newPostRequest("api/usergroups", "add_user")
- .setParam("groupId", "42")
- .setParam("userLogin", user.getLogin())
+ .setParam("id", "42")
+ .setParam("login", user.getLogin())
.execute();
}
@@ -186,8 +186,8 @@ public class AddUserActionTest {
userSession.login("admin").setGlobalPermissions(GlobalPermissions.SYSTEM_ADMIN);
tester.newPostRequest("api/usergroups", "add_user")
- .setParam("groupId", group.getId().toString())
- .setParam("userLogin", "my-admin")
+ .setParam("id", group.getId().toString())
+ .setParam("login", "my-admin")
.execute();
}
diff --git a/server/sonar-server/src/test/java/org/sonar/server/usergroups/ws/RemoveUserActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/usergroups/ws/RemoveUserActionTest.java
index 4b87e3daabe..106671a5e07 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/usergroups/ws/RemoveUserActionTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/usergroups/ws/RemoveUserActionTest.java
@@ -96,8 +96,8 @@ public class RemoveUserActionTest {
userSession.login("admin").setGlobalPermissions(GlobalPermissions.SYSTEM_ADMIN);
tester.newPostRequest("api/usergroups", "remove_user")
- .setParam("groupId", group.getId().toString())
- .setParam("userLogin", user.getLogin())
+ .setParam("id", group.getId().toString())
+ .setParam("login", user.getLogin())
.execute()
.assertNoContent();
@@ -114,8 +114,8 @@ public class RemoveUserActionTest {
userSession.login("admin").setGlobalPermissions(GlobalPermissions.SYSTEM_ADMIN);
tester.newPostRequest("api/usergroups", "remove_user")
- .setParam("groupId", users.getId().toString())
- .setParam("userLogin", user.getLogin())
+ .setParam("id", users.getId().toString())
+ .setParam("login", user.getLogin())
.execute()
.assertNoContent();
@@ -134,8 +134,8 @@ public class RemoveUserActionTest {
userSession.login("admin").setGlobalPermissions(GlobalPermissions.SYSTEM_ADMIN);
tester.newPostRequest("api/usergroups", "remove_user")
- .setParam("groupId", admins.getId().toString())
- .setParam("userLogin", user.getLogin())
+ .setParam("id", admins.getId().toString())
+ .setParam("login", user.getLogin())
.execute()
.assertNoContent();
@@ -152,8 +152,8 @@ public class RemoveUserActionTest {
userSession.login("admin").setGlobalPermissions(GlobalPermissions.SYSTEM_ADMIN);
tester.newPostRequest("api/usergroups", "remove_user")
- .setParam("groupId", "42")
- .setParam("userLogin", user.getLogin())
+ .setParam("id", "42")
+ .setParam("login", user.getLogin())
.execute();
}
@@ -166,8 +166,8 @@ public class RemoveUserActionTest {
userSession.login("admin").setGlobalPermissions(GlobalPermissions.SYSTEM_ADMIN);
tester.newPostRequest("api/usergroups", "remove_user")
- .setParam("groupId", group.getId().toString())
- .setParam("userLogin", "my-admin")
+ .setParam("id", group.getId().toString())
+ .setParam("login", "my-admin")
.execute();
}
diff --git a/server/sonar-web/src/main/js/apps/groups/users-view.js b/server/sonar-web/src/main/js/apps/groups/users-view.js
index 7786d63fe44..25db7e80158 100644
--- a/server/sonar-web/src/main/js/apps/groups/users-view.js
+++ b/server/sonar-web/src/main/js/apps/groups/users-view.js
@@ -22,9 +22,9 @@ define([
selectUrl: baseUrl + '/api/usergroups/add_user',
deselectUrl: baseUrl + '/api/usergroups/remove_user',
extra: {
- groupId: this.model.id
+ id: this.model.id
},
- selectParameter: 'userLogin',
+ selectParameter: 'login',
selectParameterValue: 'login',
parse: function (r) {
this.more = false;
diff --git a/server/sonar-web/src/main/js/apps/users/groups-view.js b/server/sonar-web/src/main/js/apps/users/groups-view.js
index 6a874070b66..8fb864add9d 100644
--- a/server/sonar-web/src/main/js/apps/users/groups-view.js
+++ b/server/sonar-web/src/main/js/apps/users/groups-view.js
@@ -23,9 +23,9 @@ define([
selectUrl: baseUrl + '/api/usergroups/add_user',
deselectUrl: baseUrl + '/api/usergroups/remove_user',
extra: {
- userLogin: this.model.id
+ login: this.model.id
},
- selectParameter: 'groupId',
+ selectParameter: 'id',
selectParameterValue: 'id',
parse: function (r) {
this.more = false;