From 07689707c2fd5067e324a68ec460d949f4249cb2 Mon Sep 17 00:00:00 2001 From: Janos Gyerik Date: Mon, 24 Jun 2019 17:33:22 +0200 Subject: [PATCH] SC-764 Drop guarded field in WS responses --- .../sonar/server/organization/ws/OrganizationsWsSupport.java | 3 +-- .../java/org/sonar/server/organization/ws/SearchAction.java | 3 +-- .../org/sonar/server/organization/ws/create-example.json | 3 +-- .../org/sonar/server/organization/ws/search-example.json | 2 -- sonar-ws/src/main/protobuf/ws-organizations.proto | 1 - 5 files changed, 3 insertions(+), 9 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, diff --git a/sonar-ws/src/main/protobuf/ws-organizations.proto b/sonar-ws/src/main/protobuf/ws-organizations.proto index cf51e3c9b90..c07f6c5a8ed 100644 --- a/sonar-ws/src/main/protobuf/ws-organizations.proto +++ b/sonar-ws/src/main/protobuf/ws-organizations.proto @@ -59,7 +59,6 @@ message Organization { optional string description = 3; optional string url = 4; optional string avatar = 5; - optional bool guarded = 6; optional Alm alm = 8; optional Actions actions = 9; optional Subscription subscription = 10; -- 2.39.5