-
-
Couldn't load subscription status.
- Fork 4.6k
Don't write to config file if config_is_read_only is set
#30130
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
Conversation
This depends on nextcloud/server#30130. Signed-off-by: Jonas Meurer <jonas@freesources.org>
|
I opened a corresponding PR in nextcloud/documentation: nextcloud/documentation#7795 |
|
So this means all the paths which set a config need to check for the exception? |
33bd721 to
25b3ecf
Compare
Right now, a config file with read-only permissions throws the same kind of exception. So in my eyes, adding the check is not a regression to how it was before. What do you think? I agree that proper notifications about the config file being set to read-only would be nice in the long term. But that can be tackled in another PR later, no? |
|
Does it make sense to use |
|
That also is true for cron jobs where I would not expects write to happen. |
Also don't write to cache in this case to prevent cache and config file being out of sync. Fixes: #29901 Signed-off-by: Jonas Meurer <jonas@freesources.org>
25b3ecf to
241dfef
Compare
Do you mean that throwing the exception should be exposed on the interface ( |
|
Leaving the merge to a re-review from @ChristophWurst or @nickvergessen |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
![]()
|
Yay, thanks @ChristophWurst! Added to #29914. Docs should be updated automatically with this PR. At least @nickvergessen said that |
|
The admin docs will be updated with the sample config, yes. But https://docs.nextcloud.com/server/latest/developer_manual/basics/storage/configuration.html should receive an update about the new exception |
With nextcloud/server#30130, `setConfigValue` throws a HintException when config is read-only.
Ah, thanks for the pointer! Did this now: nextcloud/documentation#7851 |
With nextcloud/server#30130, `setConfigValue` throws a HintException when config is read-only. Signed-off-by: Jonas Meurer <jonas@freesources.org>
Also don't write to cache in this case to prevent cache and config file
being out of sync.
Fixes: #29901