diff options
author | mrsdizzie <info@mrsdizzie.com> | 2020-06-03 23:41:02 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-03 23:41:02 -0400 |
commit | 2842f6cf42ab984a7f533a51a050425ebaa2313b (patch) | |
tree | a24aec1a31f52b0e65d33ee5d98720902cc49508 /templates | |
parent | 3affe9516afd224a85572f72878fd2ae7e4d58b6 (diff) | |
download | gitea-2842f6cf42ab984a7f533a51a050425ebaa2313b.tar.gz gitea-2842f6cf42ab984a7f533a51a050425ebaa2313b.zip |
Include query in sign in redirect (#11579)
* Include query in sign in redirect
Include query string in ctx.Data["SignInLink"] so people are redirected to the right page after singing in. Fixes case of:
Visit:
https://try.gitea.io/mrsdizzie/testcase/issues?q=&type=all&sort=&state=open&labels=7071&milestone=0&assignee=0
Sign in, then redirected to:
https://try.gitea.io/mrsdizzie/testcase/issues
Create a new "SignInLink" instead of updating the existing "Link" because too many places in the code assume "Link" won't have a query
* Apply suggestions from code review
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'templates')
-rw-r--r-- | templates/base/head_navbar.tmpl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/base/head_navbar.tmpl b/templates/base/head_navbar.tmpl index 393671d3ad..b96e99702e 100644 --- a/templates/base/head_navbar.tmpl +++ b/templates/base/head_navbar.tmpl @@ -154,7 +154,7 @@ {{svg "octicon-person" 16}} {{.i18n.Tr "register"}} </a> {{end}} - <a class="item{{if .PageIsSignIn}} active{{end}}" rel="nofollow" href="{{AppSubUrl}}/user/login?redirect_to={{.Link}}"> + <a class="item{{if .PageIsSignIn}} active{{end}}" rel="nofollow" href="{{AppSubUrl}}/user/login?redirect_to={{.CurrentURL}}"> {{svg "octicon-sign-in" 16}} {{.i18n.Tr "sign_in"}} </a> </div><!-- end anonymous right menu --> |