mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Repository level enable package or disable (#19323)
This commit is contained in:
@@ -1019,6 +1019,7 @@ func UnitTypes() func(ctx *Context) {
|
||||
ctx.Data["UnitTypeExternalWiki"] = unit_model.TypeExternalWiki
|
||||
ctx.Data["UnitTypeExternalTracker"] = unit_model.TypeExternalTracker
|
||||
ctx.Data["UnitTypeProjects"] = unit_model.TypeProjects
|
||||
ctx.Data["UnitTypePackages"] = unit_model.TypePackages
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -295,6 +295,10 @@ func newRepository() {
|
||||
log.Fatal("Failed to map Repository.PullRequest settings: %v", err)
|
||||
}
|
||||
|
||||
if !Cfg.Section("packages").Key("ENABLED").MustBool(false) {
|
||||
Repository.DisabledRepoUnits = append(Repository.DisabledRepoUnits, "repo.packages")
|
||||
}
|
||||
|
||||
// Handle default trustmodel settings
|
||||
Repository.Signing.DefaultTrustModel = strings.ToLower(strings.TrimSpace(Repository.Signing.DefaultTrustModel))
|
||||
if Repository.Signing.DefaultTrustModel == "default" {
|
||||
|
Reference in New Issue
Block a user