]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-8761 rely on feature flag when displaying organization
authorStas Vilchik <vilchiks@gmail.com>
Thu, 9 Feb 2017 14:44:00 +0000 (15:44 +0100)
committerSimon Brandhof <simon.brandhof@sonarsource.com>
Fri, 10 Feb 2017 22:07:21 +0000 (23:07 +0100)
server/sonar-web/src/main/js/store/appState/duck.js
server/sonar-web/src/main/js/store/rootReducer.js

index 2322521c638424744011a4c92dcac1850f441898..bb90fcf3bd0ba60430e1ef6967475be18c3a2277 100644 (file)
@@ -22,6 +22,7 @@ type AppState = {
   adminPages?: Array<*>,
   authenticationError: boolean,
   authorizationError: boolean,
+  organizationsEnabled: boolean,
   qualifiers: ?Array<string>
 };
 
@@ -54,6 +55,7 @@ export const requireAuthorization = () => ({
 const defaultValue = {
   authenticationError: false,
   authorizationError: false,
+  organizationsEnabled: false,
   qualifiers: null
 };
 
index a8680622e829448fb88ab9090347915e0eacb9c9..aee309845c2e5ead300d74a8abc911efa6b2f4d3 100644 (file)
@@ -121,7 +121,7 @@ export const getMyOrganizations = state => (
 );
 
 export const areThereCustomOrganizations = state => (
-    fromOrganizations.areThereCustomOrganizations(state.organizations)
+    getAppState(state).organizationsEnabled
 );
 
 export const getProjectActivity = state => (