From: Stas Vilchik Date: Thu, 9 Feb 2017 14:44:00 +0000 (+0100) Subject: SONAR-8761 rely on feature flag when displaying organization X-Git-Tag: 6.3-RC1~25 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=bdf3fea54eccaf98c9fed3e8a488e16588499c1d;p=sonarqube.git SONAR-8761 rely on feature flag when displaying organization --- diff --git a/server/sonar-web/src/main/js/store/appState/duck.js b/server/sonar-web/src/main/js/store/appState/duck.js index 2322521c638..bb90fcf3bd0 100644 --- a/server/sonar-web/src/main/js/store/appState/duck.js +++ b/server/sonar-web/src/main/js/store/appState/duck.js @@ -22,6 +22,7 @@ type AppState = { adminPages?: Array<*>, authenticationError: boolean, authorizationError: boolean, + organizationsEnabled: boolean, qualifiers: ?Array }; @@ -54,6 +55,7 @@ export const requireAuthorization = () => ({ const defaultValue = { authenticationError: false, authorizationError: false, + organizationsEnabled: false, qualifiers: null }; diff --git a/server/sonar-web/src/main/js/store/rootReducer.js b/server/sonar-web/src/main/js/store/rootReducer.js index a8680622e82..aee309845c2 100644 --- a/server/sonar-web/src/main/js/store/rootReducer.js +++ b/server/sonar-web/src/main/js/store/rootReducer.js @@ -121,7 +121,7 @@ export const getMyOrganizations = state => ( ); export const areThereCustomOrganizations = state => ( - fromOrganizations.areThereCustomOrganizations(state.organizations) + getAppState(state).organizationsEnabled ); export const getProjectActivity = state => (