Store API changeable configuration keys in Config.py
This commit is contained in:
parent
4208885e36
commit
30134dbbc9
2 changed files with 3 additions and 4 deletions
|
@ -986,10 +986,8 @@ class UiWebsocket(object):
|
|||
return self.response(to, {"error": "Not a directory"})
|
||||
|
||||
def actionConfigSet(self, to, key, value):
|
||||
allowed_keys = ["tor", "language", "tor_use_bridges", "trackers_proxy"]
|
||||
|
||||
if key not in allowed_keys:
|
||||
self.response(to, {"error": "Forbidden"})
|
||||
if key not in config.keys_api_change_allowed:
|
||||
self.response(to, {"error": "Forbidden you cannot set this config key"})
|
||||
return
|
||||
|
||||
config.saveValue(key, value)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue