Repository level enable package or disable (#19323)
This commit is contained in:
parent
6a969681cd
commit
d4834071da
14 changed files with 65 additions and 4 deletions
|
@ -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" {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue