[GITEA] do not display secrets when actions is disabled on a repo

Fixes: https://codeberg.org/forgejo/forgejo/issues/938
This commit is contained in:
Earl Warren 2023-06-28 15:15:30 +02:00
parent 5ef34a2cde
commit 5883db45c1
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00

View file

@ -27,7 +27,7 @@
<a class="{{if .PageIsSettingsKeys}}active {{end}}item" href="{{.RepoLink}}/settings/keys"> <a class="{{if .PageIsSettingsKeys}}active {{end}}item" href="{{.RepoLink}}/settings/keys">
{{.locale.Tr "repo.settings.deploy_keys"}} {{.locale.Tr "repo.settings.deploy_keys"}}
</a> </a>
{{if .EnableActions}} {{if and .EnableActions (not .UnitActionsGlobalDisabled) (.Permission.CanRead $.UnitTypeActions)}}
<a class="{{if .PageIsSettingsSecrets}}active {{end}}item" href="{{.RepoLink}}/settings/secrets"> <a class="{{if .PageIsSettingsSecrets}}active {{end}}item" href="{{.RepoLink}}/settings/secrets">
{{.locale.Tr "secrets.secrets"}} {{.locale.Tr "secrets.secrets"}}
</a> </a>