From 984a99188e854139fd01022ba65970e10b40cb94 Mon Sep 17 00:00:00 2001 From: Jonathan Miller <1+jmiller@noreply.git.mokoconsulting.tech> Date: Sun, 31 May 2026 03:07:16 +0000 Subject: [PATCH 1/2] chore: sync updates.xml 05.10.00 from main [skip ci] --- updates.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/updates.xml b/updates.xml index 4fde695698..3e53e88513 100644 --- a/updates.xml +++ b/updates.xml @@ -1,7 +1,7 @@ @@ -87,13 +87,13 @@ mokogitea application site - 05.09.00 + 05.10.00 2026-05-31 https://git.mokoconsulting.tech/MokoConsulting/MokoGitea/releases/tag/stable - https://git.mokoconsulting.tech/MokoConsulting/MokoGitea/releases/download/stable/mokogitea-05.09.00.zip + https://git.mokoconsulting.tech/MokoConsulting/MokoGitea/releases/download/stable/mokogitea-05.10.00.zip - e1ad6280b473b8606003a8002746ee3392f4447af4b31c44d77f5cc6700650ae + d7f614631c076b5b0c87e9be0adc7d0fb65261029cfcfc25530dfeac7e3976b4 stable https://git.mokoconsulting.tech/MokoConsulting/MokoGitea/raw/branch/main/CHANGELOG.md Moko Consulting -- 2.52.0 From e29ee5f91b64b5a681bec866567708aac962d9c8 Mon Sep 17 00:00:00 2001 From: Jonathan Miller Date: Sat, 30 May 2026 22:15:39 -0500 Subject: [PATCH 2/2] fix(ui): set IsRepoAdmin context data for Licenses tab visibility The template couldn't call .Permission.IsAdmin() directly. Set IsRepoAdmin as a context data variable so the template can use it. Licenses tab now shows for repo admins even without packages. Co-Authored-By: Claude Opus 4.6 (1M context) --- services/context/repo.go | 1 + templates/repo/header.tmpl | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/services/context/repo.go b/services/context/repo.go index 9cdef69a15..88a0d7d61b 100644 --- a/services/context/repo.go +++ b/services/context/repo.go @@ -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 diff --git a/templates/repo/header.tmpl b/templates/repo/header.tmpl index cb7d95abce..7a58c53a90 100644 --- a/templates/repo/header.tmpl +++ b/templates/repo/header.tmpl @@ -128,7 +128,7 @@ {{end}} - {{if or .EnableLicenses (.Permission.IsAdmin)}} + {{if or .EnableLicenses .IsRepoAdmin}} {{svg "octicon-key"}} {{ctx.Locale.Tr "repo.licenses"}} {{if .NumLicensePackages}} -- 2.52.0