From 47d50b8a9c17d595a07b6a7e157849ccf1ffc302 Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Fri, 2 Feb 2018 09:54:27 +0100 Subject: SONAR-10338 do not fetch "my" organization when not logged in --- server/sonar-web/src/main/js/store/users/actions.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'server/sonar-web/src/main/js/store') 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) => { - 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) => { -- cgit v1.2.3