fix(ui): IsRepoAdmin for Licenses tab #276

Merged
jmiller merged 1 commits from fix/licenses-tab-v2 into dev 2026-05-31 03:16:26 +00:00
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -612,6 +612,7 @@ func repoAssignmentPrepareTemplateData(ctx *Context, data *repoAssignmentPrepare
})
ctx.Data["NumLicensePackages"] = numLicensePackages
ctx.Data["EnableLicenses"] = numLicensePackages > 0
ctx.Data["IsRepoAdmin"] = ctx.Repo.Permission.IsAdmin()
ctx.Data["Title"] = repo.Owner.Name + "/" + repo.Name
ctx.Data["PageTitleCommon"] = repo.Name + " - " + setting.AppName
+1 -1
View File
@@ -128,7 +128,7 @@
</a>
{{end}}
{{if or .EnableLicenses (.Permission.IsAdmin)}}
{{if or .EnableLicenses .IsRepoAdmin}}
<a href="{{.RepoLink}}/licenses" class="{{if .IsLicensesPage}}active {{end}}item">
{{svg "octicon-key"}} {{ctx.Locale.Tr "repo.licenses"}}
{{if .NumLicensePackages}}