diff options
author | Janos Gyerik <janos.gyerik@sonarsource.com> | 2019-06-24 17:33:22 +0200 |
---|---|---|
committer | SonarTech <sonartech@sonarsource.com> | 2019-07-05 20:21:12 +0200 |
commit | 07689707c2fd5067e324a68ec460d949f4249cb2 (patch) | |
tree | f2f5179c728346cbb9cbdb704eded47f76b2bdc6 /server | |
parent | dcf3045141e03ddd47818cf6891c1d2c9b7b97b3 (diff) | |
download | sonarqube-07689707c2fd5067e324a68ec460d949f4249cb2.tar.gz sonarqube-07689707c2fd5067e324a68ec460d949f4249cb2.zip |
SC-764 Drop guarded field in WS responses
Diffstat (limited to 'server')
4 files changed, 3 insertions, 8 deletions
diff --git a/server/sonar-server/src/main/java/org/sonar/server/organization/ws/OrganizationsWsSupport.java b/server/sonar-server/src/main/java/org/sonar/server/organization/ws/OrganizationsWsSupport.java index 7d3a103079c..c070f1bb389 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/organization/ws/OrganizationsWsSupport.java +++ b/server/sonar-server/src/main/java/org/sonar/server/organization/ws/OrganizationsWsSupport.java @@ -116,8 +116,7 @@ public class OrganizationsWsSupport { Organization.Builder builder = Organization.newBuilder(); builder .setName(dto.getName()) - .setKey(dto.getKey()) - .setGuarded(dto.isGuarded()); + .setKey(dto.getKey()); ofNullable(dto.getDescription()).ifPresent(builder::setDescription); ofNullable(dto.getUrl()).ifPresent(builder::setUrl); ofNullable(dto.getAvatarUrl()).ifPresent(builder::setAvatar); diff --git a/server/sonar-server/src/main/java/org/sonar/server/organization/ws/SearchAction.java b/server/sonar-server/src/main/java/org/sonar/server/organization/ws/SearchAction.java index 8b9d3f99ed2..2939d677279 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/organization/ws/SearchAction.java +++ b/server/sonar-server/src/main/java/org/sonar/server/organization/ws/SearchAction.java @@ -159,8 +159,7 @@ public class SearchAction implements OrganizationsWsAction { boolean onlyMembershipOrganizations) { builder .setName(organization.getName()) - .setKey(organization.getKey()) - .setGuarded(organization.isGuarded()); + .setKey(organization.getKey()); ofNullable(organization.getDescription()).ifPresent(builder::setDescription); ofNullable(organization.getUrl()).ifPresent(builder::setUrl); ofNullable(organization.getAvatarUrl()).ifPresent(builder::setAvatar); diff --git a/server/sonar-server/src/main/resources/org/sonar/server/organization/ws/create-example.json b/server/sonar-server/src/main/resources/org/sonar/server/organization/ws/create-example.json index 3acbecf4148..a350af2f7a4 100644 --- a/server/sonar-server/src/main/resources/org/sonar/server/organization/ws/create-example.json +++ b/server/sonar-server/src/main/resources/org/sonar/server/organization/ws/create-example.json @@ -4,7 +4,6 @@ "name": "Foo Company", "description": "The Foo company produces quality software for Bar.", "url": "https://www.foo.com", - "avatar": "https://www.foo.com/foo.png", - "guarded": false + "avatar": "https://www.foo.com/foo.png" } } diff --git a/server/sonar-server/src/main/resources/org/sonar/server/organization/ws/search-example.json b/server/sonar-server/src/main/resources/org/sonar/server/organization/ws/search-example.json index a5eeaf171b6..f21be6f9871 100644 --- a/server/sonar-server/src/main/resources/org/sonar/server/organization/ws/search-example.json +++ b/server/sonar-server/src/main/resources/org/sonar/server/organization/ws/search-example.json @@ -8,7 +8,6 @@ { "key": "foo-company", "name": "Foo Company", - "guarded": true, "actions": { "admin": false, "delete": false, @@ -21,7 +20,6 @@ "description": "The Bar company produces quality software too.", "url": "https://www.bar.com", "avatar": "https://www.bar.com/logo.png", - "guarded": false, "actions": { "admin": true, "delete": true, |