diff options
author | Stas Vilchik <vilchiks@gmail.com> | 2017-02-28 10:15:50 +0100 |
---|---|---|
committer | Stas Vilchik <vilchiks@gmail.com> | 2017-02-28 10:15:50 +0100 |
commit | 17cfd1d4587da4c615185113901887d2354dbc99 (patch) | |
tree | 8db97de7cf966742cd48162f71234967107a76f5 /server | |
parent | d616d1ed764e78d4bde6aef773b9bad66e3a145e (diff) | |
download | sonarqube-17cfd1d4587da4c615185113901887d2354dbc99.tar.gz sonarqube-17cfd1d4587da4c615185113901887d2354dbc99.zip |
fix redirection after login
Diffstat (limited to 'server')
-rw-r--r-- | server/sonar-web/src/main/js/apps/sessions/components/LoginFormContainer.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/server/sonar-web/src/main/js/apps/sessions/components/LoginFormContainer.js b/server/sonar-web/src/main/js/apps/sessions/components/LoginFormContainer.js index 69554d224e5..90237122ec5 100644 --- a/server/sonar-web/src/main/js/apps/sessions/components/LoginFormContainer.js +++ b/server/sonar-web/src/main/js/apps/sessions/components/LoginFormContainer.js @@ -48,7 +48,10 @@ class LoginFormContainer extends React.Component { } handleSuccessfulLogin = () => { - window.location = this.props.location.query['return_to'] || (window.baseUrl + '/'); + const { location } = this.props; + const queryReturnTo = location.query['return_to']; + const returnTo = queryReturnTo ? `${queryReturnTo}${location.hash}` : `${window.baseUrl}/`; + window.location = returnTo; }; handleSubmit = (login: string, password: string) => { |