mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-03 18:02:28 +02:00
GPG commit validation (#1150)
* GPG commit validation * Add translation + some little fix * Move hash calc after retrieving of potential key + missing translation * Add some little test
This commit is contained in:
parent
9224405155
commit
14fe9010ae
14 changed files with 480 additions and 21 deletions
|
@ -5,13 +5,13 @@
|
|||
{{if .IsDiffCompare }}
|
||||
{{template "repo/commits_table" .}}
|
||||
{{else}}
|
||||
<div class="ui top attached info clearing segment">
|
||||
<div class="ui top attached info clearing segment {{if .Commit.Signature}} isSigned {{if .Verification.Verified }} isVerified {{end}}{{end}}">
|
||||
<a class="ui floated right blue tiny button" href="{{EscapePound .SourcePath}}">
|
||||
{{.i18n.Tr "repo.diff.browse_source"}}
|
||||
</a>
|
||||
{{RenderCommitMessage true .Commit.Message $.RepoLink $.Repository.ComposeMetas}}
|
||||
</div>
|
||||
<div class="ui attached info segment">
|
||||
<div class="ui attached info segment {{if .Commit.Signature}} isSigned {{if .Verification.Verified }} isVerified {{end}}{{end}}">
|
||||
{{if .Author}}
|
||||
<img class="ui avatar image" src="{{.Author.RelAvatarLink}}" />
|
||||
{{if .Author.FullName}}
|
||||
|
@ -41,6 +41,21 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{if .Commit.Signature}}
|
||||
{{if .Verification.Verified }}
|
||||
<div class="ui bottom attached positive message" style="text-align: initial;color: black;">
|
||||
<i class="green lock icon"></i>
|
||||
<span style="color: #2C662D;">Signed by :</span>
|
||||
<a href="{{.Verification.SigningUser.HomeLink}}"><strong>{{.Commit.Committer.Name}}</strong></a> <{{.Commit.Committer.Email}}>
|
||||
<span class="pull-right"><span style="color: #2C662D;">GPG key ID:</span> {{.Verification.SigningKey.KeyID}}</span>
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="ui bottom attached message" style="text-align: initial;color: black;">
|
||||
<i class="grey unlock icon"></i>
|
||||
{{.i18n.Tr .Verification.Reason}}
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
||||
{{template "repo/diff/box" .}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue