aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2017-02-28 10:15:50 +0100
committerStas Vilchik <vilchiks@gmail.com>2017-02-28 10:15:50 +0100
commit17cfd1d4587da4c615185113901887d2354dbc99 (patch)
tree8db97de7cf966742cd48162f71234967107a76f5 /server
parentd616d1ed764e78d4bde6aef773b9bad66e3a145e (diff)
downloadsonarqube-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.js5
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) => {