fix: Permission.IsAdmin for licenses #271

Merged
jmiller merged 1 commits from feat/inline-visibility-settings into dev 2026-05-31 02:34:06 +00:00
+2 -2
View File
@@ -28,7 +28,7 @@ func Licenses(ctx *context.Context) {
ctx.Data["Title"] = ctx.Tr("repo.licenses")
ctx.Data["PageIsLicenses"] = true
ctx.Data["IsLicensesPage"] = true
ctx.Data["IsRepoAdmin"] = ctx.Repo.IsAdmin()
ctx.Data["IsRepoAdmin"] = ctx.Repo.Permission.IsAdmin()
ownerID := ctx.Repo.Repository.OwnerID
@@ -127,7 +127,7 @@ func LicensesGenerateKey(ctx *context.Context) {
ctx.Data["Title"] = ctx.Tr("repo.licenses")
ctx.Data["PageIsLicenses"] = true
ctx.Data["IsLicensesPage"] = true
ctx.Data["IsRepoAdmin"] = ctx.Repo.IsAdmin()
ctx.Data["IsRepoAdmin"] = ctx.Repo.Permission.IsAdmin()
ctx.Data["NewKeyCreated"] = rawKey
// Re-render the page with the new key displayed.