mirror of
1
Fork 0
forgejo/modules
Giteabot b369ed579d
Fix Actions being enabled accidentally (#24802) (#24810)
Backport #24802 by @wolfogre

Regression of #24536. If the user doesn't explicitly disable Actions, it
will be enabled.

1. Gitea will call `loadRepositoryFrom` before `loadActionsFrom`.

25d4f95df2/modules/setting/setting.go (L234-L237)
2. In `loadRepositoryFrom`,
`rootCfg.Section("actions").Key("ENABLED").MustBool(true)` will set
`actions.ENABLED` with `true`.

25d4f95df2/modules/setting/repository.go (L313-L315)
3. In `loadActionsFrom`, `rootCfg.Section("actions")` will get a section
with Actions enabled.

25d4f95df2/modules/setting/actions.go (L23-L26)


Although the cause of the problem was using `true` by copy-paste
mistake, it also surprised me that
**`rootCfg.Section("actions").Key("ENABLED").MustBool(true)` doesn't
only read, but also write.**

Co-authored-by: Jason Song <i@wolfogre.com>
2023-05-19 15:17:48 +02:00
..
actions Fix mismatch between hook events and github event types (#24048) (#24091) 2023-04-13 15:19:41 +08:00
activitypub
analyze
auth
avatar
base
cache Update redis library to support redis v7 (#24114) (#24156) 2023-04-17 02:34:59 -04:00
charset
container
context Fix safari cookie session bug (#24772) 2023-05-18 09:10:23 +08:00
csv Add context when rendering labels or emojis (#23281) (#23319) 2023-03-06 10:32:40 -06:00
doctor Check LFS/Packages settings in dump and doctor command (#23631) (#23730) 2023-03-27 16:28:22 +08:00
emoji
eventsource
generate
git Remove `Repository.getFilesChanged` to fix Actions `paths` and `paths-ignore` filter (#23920) (#23969) 2023-04-08 16:16:21 +08:00
gitgraph
graceful
hcaptcha
highlight Refactor the setting to make unit test easier (#22405) 2023-02-20 00:12:01 +08:00
hostmatcher
html
httpcache Set `X-Gitea-Debug` header once (#23361) (#23381) 2023-03-09 06:33:05 +08:00
httplib
indexer
issue/template
json Update gitea-vet to check FSFE REUSE (#22004) 2022-12-02 22:14:57 +08:00
label Make label templates have consistent behavior and priority (#23749) (#24071) 2023-04-12 16:05:10 +02:00
lfs Make minio package support legacy MD5 checksum (#23768) (#23770) 2023-03-29 00:02:13 +08:00
log Improve trace logging for pulls and processes (#22633) 2023-02-03 18:11:48 -05:00
markup Add context when rendering labels or emojis (#23281) (#23319) 2023-03-06 10:32:40 -06:00
mcaptcha
metrics
migration Scoped labels (#22585) 2023-02-18 21:17:39 +02:00
mirror
nosql Update redis library to support redis v7 (#24114) (#24156) 2023-04-17 02:34:59 -04:00
notification
options Introduce path Clean/Join helper functions, partially backport&refactor (#23495) (#23607) 2023-03-22 19:56:20 +08:00
packages
paginator
pprof
private
process
proxy
proxyprotocol
public Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
queue Skip known flaky `queue` tests on CI environment (#24443) 2023-04-30 15:25:42 -04:00
recaptcha Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
references
regexplru
repository Make label templates have consistent behavior and priority (#23749) (#24071) 2023-04-12 16:05:10 +02:00
secret Improve decryption failure message (#24573) (#24575) 2023-05-07 22:12:32 +08:00
session Update redis library to support redis v7 (#24114) (#24156) 2023-04-17 02:34:59 -04:00
setting Fix Actions being enabled accidentally (#24802) (#24810) 2023-05-19 15:17:48 +02:00
sitemap
ssh
storage Make minio package support legacy MD5 checksum (#23768) (#23770) 2023-03-29 00:02:13 +08:00
structs Fix Org edit page bugs: renaming detection, maxlength (#24161) (#24171) 2023-04-17 12:20:47 -04:00
svg
sync Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
system Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
templates Fix custom mailer template on Windows (#24081) 2023-04-12 12:16:40 -04:00
test
timeutil Make time tooltips interactive (#23526) (#23527) 2023-03-16 16:23:11 -05:00
translation
turnstile Add new captcha: cloudflare turnstile (#22369) 2023-02-05 15:29:03 +08:00
typesniffer
updatechecker
upload Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
uri
user
util Fix `cases.Title` crash for concurrency (#23885) (#23903) 2023-04-04 01:26:14 +02:00
validation
watcher
web
webhook