forgejo/modules/repository
zeripath 4979f15c3f
Add configurable Trust Models (#11712)
* Add configurable Trust Models

Gitea's default signature verification model differs from GitHub. GitHub
uses signatures to verify that the committer is who they say they are -
meaning that when GitHub makes a signed commit it must be the committer.
The GitHub model prevents re-publishing of commits after revocation of a
key and prevents re-signing of other people's commits to create a
completely trusted repository signed by one key or a set of trusted
keys.

The default behaviour of Gitea in contrast is to always display the
avatar and information related to a signature. This allows signatures to
be decoupled from the committer. That being said, allowing arbitary
users to present other peoples commits as theirs is not necessarily
desired therefore we have a trust model whereby signatures from
collaborators are marked trusted, signatures matching the commit line
are marked untrusted and signatures that match a user in the db but not
the committer line are marked unmatched.

The problem with this model is that this conflicts with Github therefore
we need to provide an option to allow users to choose the Github model
should they wish to.

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Adjust locale strings

Signed-off-by: Andrew Thornton <art27@cantab.net>

* as per @6543

Co-authored-by: 6543 <6543@obermui.de>

* Update models/gpg_key.go

* Add migration for repository

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2020-09-20 00:44:55 +08:00
..
branch.go Handle more pathological branch and tag names (#11843) 2020-06-11 19:49:47 -04:00
check.go Refactor Cron and merge dashboard tasks (#10745) 2020-05-16 19:31:38 -04:00
commits.go make avatar lookup occur at image request (#10540) 2020-03-27 14:34:39 +02:00
commits_test.go make avatar lookup occur at image request (#10540) 2020-03-27 14:34:39 +02:00
create.go Add configurable Trust Models (#11712) 2020-09-20 00:44:55 +08:00
create_test.go Various fixes in login sources (#10428) 2020-02-23 13:52:05 -06:00
fork.go Fix visibility of forked public repos from private orgs (#11717) 2020-06-06 20:45:12 -04:00
fork_test.go Move create/fork repository from models to modules/repository (#9489) 2020-01-12 20:11:17 +08:00
generate.go Add configurable Trust Models (#11712) 2020-09-20 00:44:55 +08:00
hooks.go Re-attempt to delete temporary upload if the file is locked by another process (#12447) 2020-08-11 21:05:34 +01:00
init.go Add configurable Trust Models (#11712) 2020-09-20 00:44:55 +08:00
main_test.go Move push commits from models to modules/repository (#9370) 2020-01-10 17:34:21 +08:00
repo.go On Migration respect old DefaultBranch (#12843) 2020-09-15 22:37:44 +08:00
update.go Move PushUpdateAddDeleteTags to repository module from models (#10106) 2020-02-03 09:47:04 +01:00