]> source.dussan.org Git - sonarqube.git/commitdiff
Use changelog in users action WS
authorJulien Lancelot <julien.lancelot@sonarsource.com>
Thu, 20 Apr 2017 07:05:34 +0000 (09:05 +0200)
committerJulien Lancelot <julien.lancelot@sonarsource.com>
Fri, 21 Apr 2017 14:01:31 +0000 (16:01 +0200)
server/sonar-server/src/main/java/org/sonar/server/user/ws/CreateAction.java
server/sonar-server/src/main/java/org/sonar/server/user/ws/UpdateAction.java

index 3430d3ea4c70c4fa7ded3663964e3966e734c1e5..d0d43c426e79c610712a6356d1543069421b66d1 100644 (file)
@@ -21,6 +21,7 @@ package org.sonar.server.user.ws;
 
 import java.util.Collections;
 import java.util.List;
+import org.sonar.api.server.ws.Change;
 import org.sonar.api.server.ws.Request;
 import org.sonar.api.server.ws.Response;
 import org.sonar.api.server.ws.WebService;
@@ -65,10 +66,11 @@ public class CreateAction implements UsersWsAction {
     WebService.NewAction action = controller.createAction(ACTION_CREATE)
       .setDescription("Create a user.<br/>" +
         "If a deactivated user account exists with the given login, it will be reactivated.<br/>" +
-        "Requires Administer System permission<br/>" +
-        "Since 6.3, the password is only mandatory when creating local users, and should not be set on non local users<br/>" +
-        "Since 6.3, the 'infos' message is no more returned when a user is reactivated")
+        "Requires Administer System permission")
       .setSince("3.7")
+      .setChangelog(
+        new Change("6.3", "The password is only mandatory when creating local users, and should not be set on non local users"),
+        new Change("6.3", "The 'infos' message is no more returned when a user is reactivated"))
       .setPost(true)
       .setHandler(this);
 
index 24aeb94f08fe5cfc0a408a5e810eb3f93b6e4676..b9292bd4f733129f991de8e99df2245433108177 100644 (file)
@@ -23,6 +23,7 @@ import com.google.common.collect.Sets;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Set;
+import org.sonar.api.server.ws.Change;
 import org.sonar.api.server.ws.Request;
 import org.sonar.api.server.ws.Response;
 import org.sonar.api.server.ws.WebService;
@@ -64,8 +65,9 @@ public class UpdateAction implements UsersWsAction {
   public void define(WebService.NewController controller) {
     WebService.NewAction action = controller.createAction(ACTION_UPDATE)
       .setDescription("Update a user. If a deactivated user account exists with the given login, it will be reactivated. " +
-        "Requires Administer System permission. Since 5.2, a user's password can only be changed using the 'change_password' action.")
+        "Requires Administer System permission")
       .setSince("3.7")
+      .setChangelog(new Change("5.2", "User's password can only be changed using the 'change_password' action."))
       .setPost(true)
       .setHandler(this)
       .setResponseExample(getClass().getResource("update-example.json"));