From e5dcd71077ea80ca1084e23fab0dca0cc8a90348 Mon Sep 17 00:00:00 2001 From: Aurelien Poscia Date: Tue, 16 Jan 2024 14:43:34 +0100 Subject: [PATCH] SONAR-21114 deprecate migrated Groups membership related api v1 endpoints --- .../main/java/org/sonar/server/usergroups/ws/AddUserAction.java | 2 ++ .../java/org/sonar/server/usergroups/ws/RemoveUserAction.java | 2 ++ .../main/java/org/sonar/server/usergroups/ws/UsersAction.java | 2 ++ 3 files changed, 6 insertions(+) diff --git a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/usergroups/ws/AddUserAction.java b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/usergroups/ws/AddUserAction.java index 65d4bd93c2f..3afb6ab7f3d 100644 --- a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/usergroups/ws/AddUserAction.java +++ b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/usergroups/ws/AddUserAction.java @@ -67,7 +67,9 @@ public class AddUserAction implements UserGroupsWsAction { .setHandler(this) .setPost(true) .setSince("5.2") + .setDeprecatedSince("10.4") .setChangelog( + new Change("10.4", "Deprecated. Use POST /api/v2/authorizations/group-memberships instead"), new Change("10.0", "Parameter 'id' is removed. Use 'name' instead."), new Change("8.4", "Parameter 'id' is deprecated. Format changes from integer to string. Use 'name' instead.")); diff --git a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/usergroups/ws/RemoveUserAction.java b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/usergroups/ws/RemoveUserAction.java index 0fe682c68e1..3d26442d829 100644 --- a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/usergroups/ws/RemoveUserAction.java +++ b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/usergroups/ws/RemoveUserAction.java @@ -66,7 +66,9 @@ public class RemoveUserAction implements UserGroupsWsAction { .setHandler(this) .setPost(true) .setSince("5.2") + .setDeprecatedSince("10.4") .setChangelog( + new Change("10.4", "Deprecated. Use DELETE /api/v2/authorizations/group-memberships instead"), new Change("10.0", "Parameter 'id' is removed. Use 'name' instead."), new Change("8.4", "Parameter 'id' is deprecated. Format changes from integer to string. Use 'name' instead.")); diff --git a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/usergroups/ws/UsersAction.java b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/usergroups/ws/UsersAction.java index 0a81fd4808b..6b58192c47f 100644 --- a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/usergroups/ws/UsersAction.java +++ b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/usergroups/ws/UsersAction.java @@ -71,11 +71,13 @@ public class UsersAction implements UserGroupsWsAction { "Requires the following permission: 'Administer System'.") .setHandler(this) .setSince("5.2") + .setDeprecatedSince("10.4") .setResponseExample(getClass().getResource("users-example.json")) .addSelectionModeParam() .addSearchQuery("freddy", "names", "logins") .addPagingParams(25) .setChangelog( + new Change("10.4", "Deprecated. Use GET /api/v2/authorizations/group-memberships instead"), new Change("10.0", "Field 'managed' added to the payload."), new Change("10.0", "Parameter 'id' is removed. Use 'name' instead."), new Change("9.8", "response fields 'total', 's', 'ps' have been deprecated, please use 'paging' object instead."), -- 2.39.5