From a61cdbe2f1ac0a1b0cd77bcdeaaffbc6119bc494 Mon Sep 17 00:00:00 2001 From: Jonathan Miller Date: Sat, 30 May 2026 21:33:34 -0500 Subject: [PATCH] fix: use ctx.Repo.Permission.IsAdmin() for license admin checks Co-Authored-By: Claude Opus 4.6 (1M context) --- routers/web/repo/licenses.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/routers/web/repo/licenses.go b/routers/web/repo/licenses.go index 052865bbca..6411f2354e 100644 --- a/routers/web/repo/licenses.go +++ b/routers/web/repo/licenses.go @@ -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. -- 2.52.0