]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-10317 Make visibility param public in WS api/projects/create and api/views...
authorSimon Brandhof <simon.brandhof@sonarsource.com>
Mon, 26 Mar 2018 15:57:26 +0000 (17:57 +0200)
committerSonarTech <sonartech@sonarsource.com>
Wed, 28 Mar 2018 18:20:59 +0000 (20:20 +0200)
server/sonar-server/src/main/java/org/sonar/server/project/ws/CreateAction.java
server/sonar-server/src/test/java/org/sonar/server/project/ws/CreateActionTest.java

index 3dc2d6ad3930d3bd447c4c57d5135dc550d83948..de8d06b77cfa26f11e9fef533a627723ea3da276 100644 (file)
@@ -77,7 +77,8 @@ public class CreateAction implements ProjectsWsAction {
 
     action.setChangelog(
       new Change("6.3", "The response format has been updated and does not contain the database ID anymore"),
-      new Change("6.3", "The 'key' parameter has been renamed 'project'"));
+      new Change("6.3", "The 'key' parameter has been renamed 'project'"),
+      new Change("7.1", "The 'visibility' parameter is public"));
 
     action.createParam(PARAM_PROJECT)
       .setDescription("Key of the project")
@@ -100,7 +101,6 @@ public class CreateAction implements ProjectsWsAction {
       .setDescription("Whether the created project should be visible to everyone, or only specific user/groups.<br/>" +
         "If no visibility is specified, the default project visibility of the organization will be used.")
       .setRequired(false)
-      .setInternal(true)
       .setSince("6.4")
       .setPossibleValues(Visibility.getLabels());
 
index 15f597352bad2e34a03f17f2efc321e735889113..31d3936a36c66c8c7160a0c2cd952652c3209979 100644 (file)
@@ -322,12 +322,12 @@ public class CreateActionTest {
     assertThat(organization.isRequired()).isFalse();
     assertThat(organization.since()).isEqualTo("6.3");
 
-    WebService.Param isPrivate = definition.param(PARAM_VISIBILITY);
-    assertThat(isPrivate.description()).isNotEmpty();
-    assertThat(isPrivate.isInternal()).isTrue();
-    assertThat(isPrivate.isRequired()).isFalse();
-    assertThat(isPrivate.since()).isEqualTo("6.4");
-    assertThat(isPrivate.possibleValues()).containsExactlyInAnyOrder("private", "public");
+    WebService.Param visibilityParam = definition.param(PARAM_VISIBILITY);
+    assertThat(visibilityParam.description()).isNotEmpty();
+    assertThat(visibilityParam.isInternal()).isFalse();
+    assertThat(visibilityParam.isRequired()).isFalse();
+    assertThat(visibilityParam.since()).isEqualTo("6.4");
+    assertThat(visibilityParam.possibleValues()).containsExactlyInAnyOrder("private", "public");
 
     WebService.Param project = definition.param(PARAM_PROJECT);
     assertThat(project.isRequired()).isTrue();