]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-8753 add hidden property sonar.organizations.createPersonalOrg
authorSébastien Lesaint <sebastien.lesaint@sonarsource.com>
Thu, 9 Feb 2017 09:06:18 +0000 (10:06 +0100)
committerSébastien Lesaint <sebastien.lesaint@sonarsource.com>
Fri, 10 Feb 2017 17:21:45 +0000 (18:21 +0100)
server/sonar-ce/src/test/java/org/sonar/ce/container/ComputeEngineContainerImplTest.java
sonar-core/src/main/java/org/sonar/core/config/CorePropertyDefinitions.java
sonar-core/src/test/java/org/sonar/core/config/CorePropertyDefinitionsTest.java

index 89156276ed5d5170785d0884778d23e3cae0a82d..1d005bfc1a1b1045ec21c421c356242070d1dd67 100644 (file)
@@ -109,7 +109,7 @@ public class ComputeEngineContainerImplTest {
         + 25 // level 1
         + 47 // content of DaoModule
         + 3 // content of EsSearchModule
-        + 56 // content of CorePropertyDefinitions
+        + 57 // content of CorePropertyDefinitions
         + 1 // content of CePropertyDefinitions
     );
     assertThat(picoContainer.getParent().getParent().getParent().getParent()).isNull();
index 844b1e2b127e57e5aea05d6a4336cca95f2099a6..21c8766ae9098b35c384673287a6db20e7fd7a88 100644 (file)
@@ -44,6 +44,7 @@ public class CorePropertyDefinitions {
 
   private static final String CATEGORY_ORGANIZATIONS = "organizations";
   public static final String ORGANIZATIONS_ANYONE_CAN_CREATE = "sonar.organizations.anyoneCanCreate";
+  public static final String ORGANIZATIONS_CREATE_PERSONAL_ORG = "sonar.organizations.createPersonalOrg";
 
   private CorePropertyDefinitions() {
     // only static stuff
@@ -252,6 +253,13 @@ public class CorePropertyDefinitions {
         .defaultValue(Boolean.toString(false))
         .category(CATEGORY_ORGANIZATIONS)
         .type(PropertyType.BOOLEAN)
+        .build(),
+      PropertyDefinition.builder(ORGANIZATIONS_CREATE_PERSONAL_ORG)
+        .name("Create an organization for each new user")
+        .defaultValue(Boolean.toString(false))
+        .category(CATEGORY_ORGANIZATIONS)
+        .type(PropertyType.BOOLEAN)
+        .hidden()
         .build()));
     return defs;
   }
index 50a3028672f8e5a5c1bd2f709c507fc79db40399..6f293989b9f08a5604bb24f6f866795f8dfd26d5 100644 (file)
@@ -33,7 +33,7 @@ public class CorePropertyDefinitionsTest {
   @Test
   public void all() {
     List<PropertyDefinition> defs = CorePropertyDefinitions.all();
-    assertThat(defs).hasSize(58);
+    assertThat(defs).hasSize(59);
   }
 
   @Test