Allow to mark preferences as immutable or deprecated
- Deprecated: The option is read from the settings, but not written back when saving. This can be used for migrating options to a new name or format. (Not used yet.) - Immutable: The option can not be changed from Lua. Used for security-relevant options that should not be changable by the theme or mod charts. Currently that's networking and some file system access options.
This commit is contained in:
@@ -17,8 +17,8 @@
|
||||
|
||||
NetworkManager* NETWORK = nullptr; // global and accessible from anywhere in our program
|
||||
|
||||
Preference<bool> NetworkManager::httpEnabled("HttpEnabled", false);
|
||||
Preference<RString> NetworkManager::httpAllowHosts("HttpAllowHosts", "");
|
||||
Preference<bool> NetworkManager::httpEnabled("HttpEnabled", false, nullptr, PreferenceType::Immutable);
|
||||
Preference<RString> NetworkManager::httpAllowHosts("HttpAllowHosts", "", nullptr, PreferenceType::Immutable);
|
||||
|
||||
static const char *HttpErrorCodeNames[] = {
|
||||
"Blocked",
|
||||
|
||||
Reference in New Issue
Block a user