diff options
author | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2017-02-09 10:06:18 +0100 |
---|---|---|
committer | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2017-02-10 18:21:45 +0100 |
commit | 671678287d0ba7f97beedb36df85e93c927f60ec (patch) | |
tree | a4a1c3c915da17bd27c1e06f3a2a735a120ef62f | |
parent | a034439e4627611c0c6d179c9c550d1d2a0bbcf8 (diff) | |
download | sonarqube-671678287d0ba7f97beedb36df85e93c927f60ec.tar.gz sonarqube-671678287d0ba7f97beedb36df85e93c927f60ec.zip |
SONAR-8753 add hidden property sonar.organizations.createPersonalOrg
3 files changed, 10 insertions, 2 deletions
diff --git a/server/sonar-ce/src/test/java/org/sonar/ce/container/ComputeEngineContainerImplTest.java b/server/sonar-ce/src/test/java/org/sonar/ce/container/ComputeEngineContainerImplTest.java index 89156276ed5..1d005bfc1a1 100644 --- a/server/sonar-ce/src/test/java/org/sonar/ce/container/ComputeEngineContainerImplTest.java +++ b/server/sonar-ce/src/test/java/org/sonar/ce/container/ComputeEngineContainerImplTest.java @@ -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(); diff --git a/sonar-core/src/main/java/org/sonar/core/config/CorePropertyDefinitions.java b/sonar-core/src/main/java/org/sonar/core/config/CorePropertyDefinitions.java index 844b1e2b127..21c8766ae90 100644 --- a/sonar-core/src/main/java/org/sonar/core/config/CorePropertyDefinitions.java +++ b/sonar-core/src/main/java/org/sonar/core/config/CorePropertyDefinitions.java @@ -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; } diff --git a/sonar-core/src/test/java/org/sonar/core/config/CorePropertyDefinitionsTest.java b/sonar-core/src/test/java/org/sonar/core/config/CorePropertyDefinitionsTest.java index 50a3028672f..6f293989b9f 100644 --- a/sonar-core/src/test/java/org/sonar/core/config/CorePropertyDefinitionsTest.java +++ b/sonar-core/src/test/java/org/sonar/core/config/CorePropertyDefinitionsTest.java @@ -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 |