-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable packages by default again #19746
Conversation
It may be better to remove that code and add something like this outside that method: diff --git a/modules/setting/setting.go b/modules/setting/setting.go
index 5e317b39e..553445658 100644
--- a/modules/setting/setting.go
+++ b/modules/setting/setting.go
@@ -1024,6 +1024,10 @@ func loadFromConf(allowEmpty bool, extraConfig string) {
newPackages()
+ if !Packages.Enabled {
+ Repository.DisabledRepoUnits = append(Repository.DisabledRepoUnits, "repo.packages")
+ }
+
if err = Cfg.Section("ui").MapTo(&UI); err != nil {
log.Fatal("Failed to map UI settings: %v", err)
} else if err = Cfg.Section("markdown").MapTo(&Markdown); err != nil { |
Codecov Report
@@ Coverage Diff @@
## main #19746 +/- ##
==========================================
- Coverage 47.38% 47.37% -0.02%
==========================================
Files 958 958
Lines 133601 133603 +2
==========================================
- Hits 63313 63296 -17
- Misses 62627 62641 +14
- Partials 7661 7666 +5
Continue to review full report at Codecov.
|
unrelated but I think we should have a look at this too ... |
I don't think it's unrelated because with the current change you have two sources of truth for the "are packages enabled" question. With my proposed change there is only one and the problem would not have occured in the first place. |
same for Projects(KanBan)... |
What do you mean? I do not see project related code in the repository code. |
Yes, this maybe better because then there is only one place to read package configuration. |
ok let's merge this and we can talk about refactoring next ... |
* giteaofficial/main: Move org functions (go-gitea#19753) [doctor] pq: syntax error at or near "." quote user table name (go-gitea#19765) [doctor] update the help with fix capabilities (go-gitea#19762) Remove fomantic progress module (go-gitea#19760) Make Ctrl+Enter (quick submit) work for issue comment and wiki editor (go-gitea#19729) Enable packages by default again (as described by docs) (go-gitea#19746) Replace blue button and label classes with primary (go-gitea#19763) Fix org package owner permissions (go-gitea#19742)
#19323 used the wrong default value to check if packages are globally disabled.
This means that unexpectedly, users that did not set
[packages] ENABLE = true
in their app.ini would simply not be able to use packages.