-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When must change password only show signout button in header #11600
When must change password only show signout button in header #11600
Conversation
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 go-gitea#11554 Signed-off-by: Andrew Thornton <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should go to the changelog. The navbar is a likely template users will customize; if I've got this right, this will break those customizations (or rather their customizations will lack this needed change).
…ssword-for-user-events
Make lg-tm work |
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 go-gitea#11554 Signed-off-by: Andrew Thornton <[email protected]>
{{if .IsSigned}} | ||
{{if and .IsSigned .MustChangePassword}} | ||
{{/* No links */}} | ||
{{else if .IsSigned}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It could be just simplified to if and .IsSigned (not .MustChangePassword)
to not need empty if
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I considered that and originally wrote that but thought it better to be explicit and for the if statement to match the next one. We'd only have to write a two line comment to explain.
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 <[email protected]> Co-authored-by: zeripath <[email protected]>
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 go-gitea#11554 Signed-off-by: Andrew Thornton <[email protected]>
When "Must Change Password" simplify the navbar header to only show the Signout button as all other links will redirect back in any case.
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 [email protected]