diff options
author | zeripath <art27@cantab.net> | 2020-05-26 23:39:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-26 23:39:39 +0100 |
commit | a00974c3b8a589677c508c522d3aab8b57b839f3 (patch) | |
tree | 5c9ecec5d4704c2f581184f3ae95479a333276cc /routers/user/auth.go | |
parent | 926e63bb9e39a38f3c4d2d280bb01b259fd7b2f8 (diff) | |
download | gitea-a00974c3b8a589677c508c522d3aab8b57b839f3.tar.gz gitea-a00974c3b8a589677c508c522d3aab8b57b839f3.zip |
When must change password only show Signout (#11600)
When "Must Change Password" simplify the navbar header to only show the
signout button as all other links will redirect back. This prevents the
notifications icon from showing preventing initialization of the
event-source and hence preventing redirect_to being set, however in
addition do not set the redirect_to cookie if we are looking at the
/user/events page.
Fix #11554
Signed-off-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'routers/user/auth.go')
-rw-r--r-- | routers/user/auth.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/routers/user/auth.go b/routers/user/auth.go index e1a8854804..a253e6cdbb 100644 --- a/routers/user/auth.go +++ b/routers/user/auth.go @@ -1489,6 +1489,7 @@ func ResetPasswdPost(ctx *context.Context) { func MustChangePassword(ctx *context.Context) { ctx.Data["Title"] = ctx.Tr("auth.must_change_password") ctx.Data["ChangePasscodeLink"] = setting.AppSubURL + "/user/settings/change_password" + ctx.Data["MustChangePassword"] = true ctx.HTML(200, tplMustChangePassword) } |