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.