2
0
Files
gitcaddy-server/models/migrations/v1_26/v369.go
logikonline 044c65e425 feat(releases): add public release downloads setting for limited repos
Add PublicReleaseDownloads repository setting to allow direct release downloads without authentication for Limited visibility repos. Adds migration v369, checkbox in Advanced Settings (only shown for Limited repos with releases enabled), and updates attachment serving logic to check HasPublicReleases. Moves release download routes outside auth requirement when public downloads enabled. Complements existing pages config PublicReleases toggle.
2026-03-16 00:26:53 -04:00

17 lines
320 B
Go

// Copyright 2026 MarketAlly. All rights reserved.
// SPDX-License-Identifier: MIT
package v1_26
import (
"xorm.io/xorm"
)
func AddPublicReleaseDownloadsToRepository(x *xorm.Engine) error {
type Repository struct {
PublicReleaseDownloads bool `xorm:"NOT NULL DEFAULT false"`
}
return x.Sync(new(Repository))
}