0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-12-25 10:34:51 +01:00
gitea/modules
Jason Song 7985cde84d
Fix Actions being enabled accidentally (#24802)
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.**
2023-05-19 19:35:12 +08:00
..
actions
activitypub
analyze
assetfs
auth
avatar Improve avatar uploading / resizing / compressing, remove Fomantic card module (#24653) 2023-05-13 20:59:11 +02:00
base
cache
charset
container
context Refactor Pull Mirror and fix out-of-sync bugs (#24732) 2023-05-15 19:02:10 +00:00
csv
doctor
emoji
eventsource
generate
git Add status indicator on main home screen for each repo (#24638) 2023-05-13 21:59:01 +00:00
gitgraph
graceful Implement systemd-notify protocol (#21151) 2023-05-15 22:20:30 +00:00
hcaptcha
highlight
hostmatcher
html Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
httpcache Use standard HTTP library to serve files (#24693) 2023-05-13 16:04:57 +02:00
httplib Use standard HTTP library to serve files (#24693) 2023-05-13 16:04:57 +02:00
indexer Remove unnecessary code (#24610) 2023-05-10 04:57:06 +00:00
issue/template
json
label
lfs Make repository response support HTTP range request (#24592) 2023-05-09 15:34:36 +08:00
log
markup
mcaptcha
metrics
migration
mirror Rewrite queue (#24505) 2023-05-08 19:49:59 +08:00
nosql
notification Rewrite queue (#24505) 2023-05-08 19:49:59 +08:00
options
packages Add Go package registry (#24687) 2023-05-14 23:38:40 +08:00
paginator
pprof
private
process
proxy
proxyprotocol
public Use standard HTTP library to serve files (#24693) 2023-05-13 16:04:57 +02:00
queue Improve queue & process & stacktrace (#24636) 2023-05-11 07:45:47 +00:00
recaptcha
references
regexplru
repository Improve avatar uploading / resizing / compressing, remove Fomantic card module (#24653) 2023-05-13 20:59:11 +02:00
secret
session
setting Fix Actions being enabled accidentally (#24802) 2023-05-19 19:35:12 +08:00
sitemap
ssh
storage Fix TestMinioStorageIterator skip message (#24765) 2023-05-17 16:22:17 +00:00
structs Make repo migration cancelable and fix various bugs (#24605) 2023-05-11 08:25:46 +00:00
svg
sync
system
templates Modify luminance calculation and extract related functions into single files (#24586) 2023-05-10 11:19:03 +00:00
test Rewrite queue (#24505) 2023-05-08 19:49:59 +08:00
testlogger Make testlogger output "TestLogger" prefix (#24683) 2023-05-12 14:20:29 +00:00
timeutil
translation
turnstile
typesniffer
updatechecker
upload
uri
user
util Add Alpine package registry (#23714) 2023-05-12 17:27:50 +00:00
validation
web
webhook