diff --git a/templates/repo/header.tmpl b/templates/repo/header.tmpl
index d105bcc790..bbb2238402 100644
--- a/templates/repo/header.tmpl
+++ b/templates/repo/header.tmpl
@@ -155,7 +155,7 @@
{{end}}
- {{if and .Repository.CanEnablePulls (.Permission.CanRead ctx.Consts.RepoUnitTypePullRequests)}}
+ {{if and ctx.IsSigned .Repository.CanEnablePulls (.Permission.CanRead ctx.Consts.RepoUnitTypePullRequests)}}
{{svg "octicon-git-pull-request"}} {{ctx.Locale.Tr "repo.pulls"}}
{{if .Repository.NumOpenPulls}}
@@ -164,7 +164,7 @@
{{end}}
- {{if and .EnableActions (.Permission.CanRead ctx.Consts.RepoUnitTypeActions) (not .IsEmptyRepo)}}
+ {{if and .EnableActions (.Permission.CanWrite ctx.Consts.RepoUnitTypeCode) (not .IsEmptyRepo)}}
{{svg "octicon-play"}} {{ctx.Locale.Tr "actions.actions"}}
{{if .Repository.NumOpenActionRuns}}
@@ -180,7 +180,7 @@
{{end}}
{{$projectsUnit := .Repository.MustGetUnit ctx ctx.Consts.RepoUnitTypeProjects}}
- {{if and (not ctx.Consts.RepoUnitTypeProjects.UnitGlobalDisabled) (.Permission.CanRead ctx.Consts.RepoUnitTypeProjects) ($projectsUnit.ProjectsConfig.IsProjectsAllowed "repo")}}
+ {{if and ctx.IsSigned (not ctx.Consts.RepoUnitTypeProjects.UnitGlobalDisabled) (.Permission.CanRead ctx.Consts.RepoUnitTypeProjects) ($projectsUnit.ProjectsConfig.IsProjectsAllowed "repo")}}
{{svg "octicon-project"}} {{ctx.Locale.Tr "repo.projects"}}
{{if .Repository.NumOpenProjects}}
@@ -210,7 +210,7 @@
{{end}}
- {{if and (.Permission.CanReadAny ctx.Consts.RepoUnitTypePullRequests ctx.Consts.RepoUnitTypeIssues ctx.Consts.RepoUnitTypeReleases ctx.Consts.RepoUnitTypeCode) (not .IsEmptyRepo)}}
+ {{if and (.Permission.CanWrite ctx.Consts.RepoUnitTypeCode) (not .IsEmptyRepo)}}
{{svg "octicon-pulse"}} {{ctx.Locale.Tr "repo.activity"}}