Skip to content
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

Conversation

zeripath
Copy link
Contributor

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]

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]>
@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label May 25, 2020
Copy link
Member

@guillep2k guillep2k left a 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).

@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels May 26, 2020
@zeripath
Copy link
Contributor Author

Make lg-tm work

@zeripath zeripath merged commit a00974c into go-gitea:master May 26, 2020
guillep2k pushed a commit to guillep2k/gitea that referenced this pull request May 26, 2020
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]>
@guillep2k guillep2k added the backport/done All backports for this PR have been created label May 26, 2020
{{if .IsSigned}}
{{if and .IsSigned .MustChangePassword}}
{{/* No links */}}
{{else if .IsSigned}}
Copy link
Member

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

Copy link
Contributor Author

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.

zeripath added a commit that referenced this pull request May 27, 2020
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]>
@zeripath zeripath deleted the fix-11554-do-not-set-redirect-to-change-password-for-user-events branch May 27, 2020 07:14
ydelafollye pushed a commit to ydelafollye/gitea that referenced this pull request Jul 31, 2020
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]>
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/done All backports for this PR have been created lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New user recommended setting password question
5 participants