Skip to content

Commit

Permalink
Use changelog in users action WS
Browse files Browse the repository at this point in the history
  • Loading branch information
julienlancelot committed Apr 21, 2017
1 parent 856dab0 commit 7c5b10e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Expand Up @@ -21,6 +21,7 @@

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;
Expand Down Expand Up @@ -65,10 +66,11 @@ public void define(WebService.NewController controller) {
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);

Expand Down
Expand Up @@ -23,6 +23,7 @@
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;
Expand Down Expand Up @@ -64,8 +65,9 @@ public UpdateAction(UserUpdater userUpdater, UserSession userSession, UserJsonWr
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"));
Expand Down

0 comments on commit 7c5b10e

Please sign in to comment.