@@ -71,7 +71,7 @@ const (
7171)
7272
7373// 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 {
7575 newCommits := make ([]* SignCommit , 0 , len (oldCommits ))
7676 keyMap := map [string ]bool {}
7777
@@ -81,7 +81,7 @@ func ParseCommitsWithSignature(oldCommits []*user_model.UserCommit, repoTrustMod
8181 Verification : ParseCommitWithSignature (c .Commit ),
8282 }
8383
84- _ = CalculateTrustStatus (signCommit .Verification , repoTrustModel , isCodeReader , & keyMap )
84+ _ = CalculateTrustStatus (signCommit .Verification , repoTrustModel , isOwnerMemberCollaborator , & keyMap )
8585
8686 newCommits = append (newCommits , signCommit )
8787 }
@@ -455,7 +455,7 @@ func hashAndVerifyForKeyID(sig *packet.Signature, payload string, committer *use
455455
456456// CalculateTrustStatus will calculate the TrustStatus for a commit verification within a repository
457457// 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 ) {
459459 if ! verification .Verified {
460460 return
461461 }
@@ -500,11 +500,11 @@ func CalculateTrustStatus(verification *CommitVerification, repoTrustModel repo_
500500 var has bool
501501 isMember , has = (* keyMap )[verification .SigningKey .KeyID ]
502502 if ! has {
503- isMember , err = isCodeReader (verification .SigningUser )
503+ isMember , err = isOwnerMemberCollaborator (verification .SigningUser )
504504 (* keyMap )[verification .SigningKey .KeyID ] = isMember
505505 }
506506 } else {
507- isMember , err = isCodeReader (verification .SigningUser )
507+ isMember , err = isOwnerMemberCollaborator (verification .SigningUser )
508508 }
509509
510510 if ! isMember {
0 commit comments