aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSandro Santilli <strk@kbt.io>2016-08-11 19:14:39 +0200
committer无闻 <u@gogs.io>2016-08-11 10:14:39 -0700
commit3380c946e12e53368f28a2b7285c7bad0c1746dc (patch)
tree0b21a091feae7905fbed7d7f271ea91ba061aaa8
parentd625e41c6c4d40fadbeaf99dd97e77aa0c9085ae (diff)
Always set redirect_to on header-provided sign-in (#3435)
This is an attempt to fix #3089 following the strategy introduced in d625e41c6c4d40fadbeaf99dd97e77aa0c9085ae, although that strategy by itself does not seem to be sufficient. What needs be done is honouring the redirect_url query parameter from the auth router.
-rw-r--r--templates/base/head.tmpl2
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/base/head.tmpl b/templates/base/head.tmpl
index ea7b7cc1..68ea4789 100644
--- a/templates/base/head.tmpl
+++ b/templates/base/head.tmpl
@@ -139,7 +139,7 @@
<i class="octicon octicon-person"></i> {{.i18n.Tr "register"}}
</a>
{{end}}
- <a class="item{{if .PageIsSignIn}} active{{end}}" href="{{AppSubUrl}}/user/login">
+ <a class="item{{if .PageIsSignIn}} active{{end}}" href="{{AppSubUrl}}/user/login?redirect_to={{.Link}}">
<i class="octicon octicon-sign-in"></i> {{.i18n.Tr "sign_in"}}
</a>
</div><!-- end anonymous right menu -->