@@ -71,7 +71,7 @@ const (
71
71
)
72
72
73
73
// ParseCommitsWithSignature checks if signaute of commits are corresponding to users gpg keys.
74
- func ParseCommitsWithSignature (oldCommits []* user_model.UserCommit , repoTrustModel repo_model.TrustModelType , isCodeReader func (* user_model.User ) (bool , error )) []* SignCommit {
74
+ func ParseCommitsWithSignature (oldCommits []* user_model.UserCommit , repoTrustModel repo_model.TrustModelType , isOwnerMemberCollaborator func (* user_model.User ) (bool , error )) []* SignCommit {
75
75
newCommits := make ([]* SignCommit , 0 , len (oldCommits ))
76
76
keyMap := map [string ]bool {}
77
77
@@ -81,7 +81,7 @@ func ParseCommitsWithSignature(oldCommits []*user_model.UserCommit, repoTrustMod
81
81
Verification : ParseCommitWithSignature (c .Commit ),
82
82
}
83
83
84
- _ = CalculateTrustStatus (signCommit .Verification , repoTrustModel , isCodeReader , & keyMap )
84
+ _ = CalculateTrustStatus (signCommit .Verification , repoTrustModel , isOwnerMemberCollaborator , & keyMap )
85
85
86
86
newCommits = append (newCommits , signCommit )
87
87
}
@@ -455,7 +455,7 @@ func hashAndVerifyForKeyID(sig *packet.Signature, payload string, committer *use
455
455
456
456
// CalculateTrustStatus will calculate the TrustStatus for a commit verification within a repository
457
457
// There are several trust models in Gitea
458
- func CalculateTrustStatus (verification * CommitVerification , repoTrustModel repo_model.TrustModelType , isCodeReader func (* user_model.User ) (bool , error ), keyMap * map [string ]bool ) (err error ) {
458
+ func CalculateTrustStatus (verification * CommitVerification , repoTrustModel repo_model.TrustModelType , isOwnerMemberCollaborator func (* user_model.User ) (bool , error ), keyMap * map [string ]bool ) (err error ) {
459
459
if ! verification .Verified {
460
460
return
461
461
}
@@ -500,11 +500,11 @@ func CalculateTrustStatus(verification *CommitVerification, repoTrustModel repo_
500
500
var has bool
501
501
isMember , has = (* keyMap )[verification .SigningKey .KeyID ]
502
502
if ! has {
503
- isMember , err = isCodeReader (verification .SigningUser )
503
+ isMember , err = isOwnerMemberCollaborator (verification .SigningUser )
504
504
(* keyMap )[verification .SigningKey .KeyID ] = isMember
505
505
}
506
506
} else {
507
- isMember , err = isCodeReader (verification .SigningUser )
507
+ isMember , err = isOwnerMemberCollaborator (verification .SigningUser )
508
508
}
509
509
510
510
if ! isMember {
0 commit comments