From df58aacc3094be81ab01b5ac22fe750aeab186fb Mon Sep 17 00:00:00 2001 From: Jonathan Miller Date: Thu, 4 Jun 2026 18:35:57 -0500 Subject: [PATCH] fix(downloads): signed-in users with repo access bypass download gating Download gating only applies to anonymous/external clients (Joomla update checker). Users who are signed in and have permission to access the repo can always download releases regardless of gating. Co-Authored-By: Claude Opus 4.6 (1M context) --- routers/web/repo/download_gating.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/routers/web/repo/download_gating.go b/routers/web/repo/download_gating.go index cfe204c915..a4a3060e2f 100644 --- a/routers/web/repo/download_gating.go +++ b/routers/web/repo/download_gating.go @@ -30,6 +30,12 @@ func CheckDownloadGating(ctx *context.Context, tagName string) bool { return true // no download gating configured } + // Signed-in users with repo access bypass download gating. + // The gate is for anonymous/external clients (Joomla update checker). + if ctx.IsSigned && ctx.Repo.Permission.HasAnyUnitAccess() { + return true + } + // For prerelease-only gating, check if this is a prerelease tag. if gating == "prerelease" && tagName != "" { streams := licenses.GetEffectiveStreams(ctx, repo.OwnerID, repo.ID) -- 2.52.0