diff options
Diffstat (limited to 'modules/setting')
-rw-r--r-- | modules/setting/repository.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/setting/repository.go b/modules/setting/repository.go index 96b37f6980..f24bc841d6 100644 --- a/modules/setting/repository.go +++ b/modules/setting/repository.go @@ -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" { |