1
1
mirror of https://github.com/go-gitea/gitea synced 2025-10-26 08:58:24 +00:00
This commit is contained in:
Lunny Xiao
2022-10-16 18:19:38 +08:00
committed by Jason Song
parent b00cd8de90
commit b8c7ea782c
5 changed files with 36 additions and 5 deletions

View File

@@ -46,6 +46,7 @@ import (
"code.gitea.io/gitea/modules/timeutil"
"code.gitea.io/gitea/modules/util"
"code.gitea.io/gitea/services/gitdiff"
secret_service "code.gitea.io/gitea/services/secrets"
"github.com/editorconfig/editorconfig-core-go/v2"
)
@@ -478,6 +479,10 @@ func NewFuncMap() []template.FuncMap {
"Shadow": func(s string) string {
return "******"
},
"DecryptSecret": func(s string) string {
v, _ := secret_service.DecryptString(s)
return v
},
}}
}