Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Disable unnecessary OpenID/OAuth2 elements#18491

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
zeripath merged 3 commits intogo-gitea:mainfromibpl:main-IB#1115256
Feb 9, 2022

Conversation

@pboguslawski
Copy link
Contributor

@pboguslawskipboguslawski commentedJan 31, 2022
edited
Loading

This mod fixes disabling unnecessary OpenID/OAuth2 elements.

Related:#13129
Author-Change-Id: IB#1115256

This mod fixes disabling unnecessary OpenID elements.Related:go-gitea#13129Author-Change-Id: IB#1115256
m.Post("/link_account_signup",bindIgnErr(forms.RegisterForm{}),auth.LinkAccountPostRegister)
m.Group("/link_account",func() {
m.Get("",auth.LinkAccount)
},openIDSignInEnabled)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

openIDSignInEnabled can be added to theGet andPost arguments, no need to go all fancy withGroup here.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Just tested that

m.Get("/", Home, openIDSignInEnabled)

does not forbid access to / when openIDSignInEnabled is disabled but

m.Group("/", func() {m.Get("", Home)}, openIDSignInEnabled)

does. Seems that simply addingopenIDSignInEnabled toGet arguments does not work.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

m.Get("/", openIDSignInEnabled, Home)

works ok - will fix it.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Done.

@GiteaBotGiteaBot added the lgtm/need 2This PR needs two approvals by maintainers to be considered for merging. labelJan 31, 2022
Fixes:8faceacRelated:go-gitea#18491 (review)Author-Change-Id: IB#1115256
@GiteaBotGiteaBot added lgtm/need 1This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2This PR needs two approvals by maintainers to be considered for merging. labelsFeb 1, 2022
@GiteaBotGiteaBot added lgtm/doneThis PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1This PR needs approval from one additional maintainer to be merged. labelsFeb 2, 2022
Copy link
Member

@lunnylunny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

LinkAccount is not only for openID, OAuth2 could also use that. This is totally wrong.

@pboguslawskipboguslawski changed the titleDisable unnecessary OpenID elementsDisable unnecessary OpenID/OAuth2 elementsFeb 2, 2022
@pboguslawski
Copy link
ContributorAuthor

LinkAccount is not only for openID, OAuth2 could also use that. This is totally wrong.

Fixed in513303b.

@techknowlogicktechknowlogick added this to the1.17.0 milestoneFeb 2, 2022
@zeripathzeripath merged commitc917f2d intogo-gitea:mainFeb 9, 2022
zjjhot added a commit to zjjhot/gitea that referenced this pull requestFeb 10, 2022
* giteaofficial/main:  Fix issue with docker-rootless shimming script (go-gitea#18690)  tests: remove redundant comparison in repo dump/restore (go-gitea#18660)  [skip ci] Updated translations via Crowdin  Disable unnecessary OpenID/OAuth2 elements (go-gitea#18491)  Add apply-patch, basic revert and cherry-pick functionality (go-gitea#17902)  C preprocessor colors improvement (go-gitea#18671)  Update object repo with the migrated repository (go-gitea#18684)
@pboguslawskipboguslawski deleted the main-IB#1115256 branchFebruary 11, 2022 10:29
Chianina pushed a commit to Chianina/gitea that referenced this pull requestMar 28, 2022
This mod fixes disabling unnecessary OpenID elements.Related:go-gitea#13129Author-Change-Id: IB#1115256
@go-giteago-gitea locked and limited conversation to collaboratorsApr 28, 2022
@wxiaoguang
Copy link
Contributor

wxiaoguang commentedOct 25, 2025
edited
Loading

@pboguslawski this change (maybe) causes regressions like:

Could you propose a proper fix?

(I will propose a quick fix to revert this PR for a temp approach)

Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

@lunnylunnylunny approved these changes

@silverwindsilverwindsilverwind approved these changes

+2 more reviewers

@zeripathzeripathzeripath approved these changes

@GustedGustedGusted approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

lgtm/doneThis PR has enough approvals to get merged. There are no important open reservations anymore.

Projects

None yet

Milestone

1.17.0

Development

Successfully merging this pull request may close these issues.

8 participants

@pboguslawski@wxiaoguang@lunny@silverwind@zeripath@Gusted@techknowlogick@GiteaBot

[8]ページ先頭

©2009-2025 Movatter.jp