aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/store
diff options
context:
space:
mode:
authorStas Vilchik <stas.vilchik@sonarsource.com>2018-02-02 09:54:27 +0100
committerStas Vilchik <stas.vilchik@sonarsource.com>2018-03-14 09:20:28 +0100
commit47d50b8a9c17d595a07b6a7e157849ccf1ffc302 (patch)
tree1723a9347c7f9f0c8b5d0efc2afecf01b7dea4fd /server/sonar-web/src/main/js/store
parentad9dd01e97b800714e76baa9a31e80db7ecc1c90 (diff)
downloadsonarqube-47d50b8a9c17d595a07b6a7e157849ccf1ffc302.tar.gz
sonarqube-47d50b8a9c17d595a07b6a7e157849ccf1ffc302.zip
SONAR-10338 do not fetch "my" organization when not logged in
Diffstat (limited to 'server/sonar-web/src/main/js/store')
-rw-r--r--server/sonar-web/src/main/js/store/users/actions.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/server/sonar-web/src/main/js/store/users/actions.ts b/server/sonar-web/src/main/js/store/users/actions.ts
index dd9d84ffe81..46c31b7c472 100644
--- a/server/sonar-web/src/main/js/store/users/actions.ts
+++ b/server/sonar-web/src/main/js/store/users/actions.ts
@@ -39,7 +39,10 @@ export const receiveUser = (user: any) => ({
export const skipOnboarding = () => ({ type: SKIP_ONBOARDING });
export const fetchCurrentUser = () => (dispatch: Dispatch<any>) => {
- return api.getCurrentUser().then(user => dispatch(receiveCurrentUser(user)));
+ return api.getCurrentUser().then(user => {
+ dispatch(receiveCurrentUser(user));
+ return user;
+ });
};
export const setHomePage = (homepage: HomePage) => (dispatch: Dispatch<any>) => {