You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
forgejo/models
Denys Konovalov 63ab92d797
Pre-register OAuth2 applications for git credential helpers (#26291)
This PR is an extended implementation of #25189 and builds upon the
proposal by @hickford in #25653, utilizing some ideas proposed
internally by @wxiaoguang.

Mainly, this PR consists of a mechanism to pre-register OAuth2
applications on startup, which can be enabled or disabled by modifying
the `[oauth2].DEFAULT_APPLICATIONS` parameter in app.ini. The OAuth2
applications registered this way are being marked as "locked" and
neither be deleted nor edited over UI to prevent confusing/unexpected
behavior. Instead, they're being removed if no longer enabled in config.


![grafik](https://github.com/go-gitea/gitea/assets/47871822/81a78b1c-4b68-40a7-9e99-c272ebb8f62e)

The implemented mechanism can also be used to pre-register other OAuth2
applications in the future, if wanted.

Co-authored-by: hickford <mirth.hickford@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>

---------

Co-authored-by: M Hickford <mirth.hickford@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
11 months ago
..
actions Fix log typo in task.go (#26337) 11 months ago
activities Bypass MariaDB performance bug of the "IN" sub-query, fix incorrect IssueIndex (#26279) 11 months ago
admin Replace `interface{}` with `any` (#25686) 1 year ago
asymkey Update tool dependencies, lock govulncheck and actionlint (#25655) 1 year ago
auth Pre-register OAuth2 applications for git credential helpers (#26291) 11 months ago
avatars Avoid warning for system setting when start up (#23054) 1 year ago
db Refactor and enhance issue indexer to support both searching, filtering and paging (#26012) 11 months ago
dbfs Fix content holes in Actions task logs file (#25560) 1 year ago
fixtures fix generated source URL on rendered files (#26364) 11 months ago
git Some fixes of the prompt of new branches (#26257) 11 months ago
issues Use more `IssueList` instead of `[]*Issue` (#26369) 11 months ago
migrations Fix typo in metadata (#26207) 11 months ago
organization Remove unused code (#25734) 1 year ago
packages Test if container blob is accessible before mounting (#22759) 1 year ago
perm some less naked returns (#25682) 1 year ago
project Update xorm version (#26128) 12 months ago
pull refactor some functions to support ctx as first parameter (#21878) 2 years ago
repo Fix the topic validation rule and suport dots (#26286) 11 months ago
secret Support configuration variables on Gitea Actions (#24724) 1 year ago
shared/types Display owner of a runner as a tooltip instead of static text (#24377) 1 year ago
system Replace `interface{}` with `any` (#25686) 1 year ago
unit Rewrite logger system (#24726) 1 year ago
unittest Replace `interface{}` with `any` (#25686) 1 year ago
user Fix API leaking Usermail if not logged in (#25097) 11 months ago
webhook Replace `interface{}` with `any` (#25686) 1 year ago
error.go Sync branches into databases (#22743) 1 year ago
fixture_generation.go Implement FSFE REUSE for golang files (#21840) 2 years ago
fixture_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
main_test.go Merge setting.InitXXX into one function with options (#24389) 1 year ago
migrate.go Add context parameter to some database functions (#26055) 12 months ago
migrate_test.go Add context parameter to some database functions (#26055) 12 months ago
org.go refactor some functions to support ctx as first parameter (#21878) 2 years ago
org_team.go Remove org users who belong to no teams (#24247) 1 year ago
org_team_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
org_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
repo.go Update tool dependencies, lock govulncheck and actionlint (#25655) 1 year ago
repo_collaboration.go refactor some functions to support ctx as first parameter (#21878) 2 years ago
repo_collaboration_test.go Rename `repo.GetOwner` to `repo.LoadOwner` (#22967) 1 year ago
repo_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
repo_transfer.go Fix unclear `IsRepositoryExist` logic (#24374) 1 year ago
repo_transfer_test.go Rename almost all Ctx functions (#22071) 2 years ago