diff options
author | Joram Wilander <jwawilander@gmail.com> | 2018-02-13 11:08:49 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-13 11:08:49 -0500 |
commit | 5c560db8102b8ce6dc29bf91ab5e24ca4af66fdf (patch) | |
tree | 6cd13db91ab4a768e33ba92e7f8a3cea71da4481 /api4/system.go | |
parent | d88d2bc2ed3aefa68b5ed2942f493ae42bb40bfa (diff) | |
download | chat-5c560db8102b8ce6dc29bf91ab5e24ca4af66fdf.tar.gz chat-5c560db8102b8ce6dc29bf91ab5e24ca4af66fdf.tar.bz2 chat-5c560db8102b8ce6dc29bf91ab5e24ca4af66fdf.zip |
ABC-176 Prevent changing PluginSettings.EnableUploads through the API (#8249)
* Prevent changing PluginSettings.EnableUploads through the API
* Contain api4 test case in it's own test
Diffstat (limited to 'api4/system.go')
-rw-r--r-- | api4/system.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/api4/system.go b/api4/system.go index 061ffe094..2355cb476 100644 --- a/api4/system.go +++ b/api4/system.go @@ -121,6 +121,9 @@ func updateConfig(c *Context, w http.ResponseWriter, r *http.Request) { return } + // Do not allow plugin uploads to be toggled through the API + cfg.PluginSettings.EnableUploads = c.App.GetConfig().PluginSettings.EnableUploads + err := c.App.SaveConfig(cfg, true) if err != nil { c.Err = err |