From 671678287d0ba7f97beedb36df85e93c927f60ec Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=A9bastien=20Lesaint?= Date: Thu, 9 Feb 2017 10:06:18 +0100 Subject: [PATCH] SONAR-8753 add hidden property sonar.organizations.createPersonalOrg --- .../ce/container/ComputeEngineContainerImplTest.java | 2 +- .../org/sonar/core/config/CorePropertyDefinitions.java | 8 ++++++++ .../sonar/core/config/CorePropertyDefinitionsTest.java | 2 +- 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 defs = CorePropertyDefinitions.all(); - assertThat(defs).hasSize(58); + assertThat(defs).hasSize(59); } @Test -- 2.39.5