mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-09-12 21:28:30 -04:00
Fix logic around denying setting or modifying local settings from the server
This commit is contained in:
1 parent
cf910d2616
commit
550fa1046e
1 file changed
+12
-2
+12
-2
@@ -231,6 +231,11 @@ void SettingsManager::ModifySettings(std::string settings_key, json new_settings
|
||||
}
|
||||
}
|
||||
|
||||
if(local_setting && from_server)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if(!local_setting && ResourceManager::get()->IsLocalClient() && (ResourceManager::get()->GetLocalClient()->GetSupportsSettingsManagerAPI()))
|
||||
{
|
||||
/*-------------------------------------------------*\
|
||||
@@ -243,7 +248,7 @@ void SettingsManager::ModifySettings(std::string settings_key, json new_settings
|
||||
|
||||
ResourceManager::get()->GetLocalClient()->SettingsManager_ModifySettings(settings_json.dump());
|
||||
}
|
||||
else if(!from_server)
|
||||
else
|
||||
{
|
||||
mutex.lock();
|
||||
json filtered_settings = FilterSettingsAgainstSchema(settings_key, new_settings);
|
||||
@@ -287,6 +292,11 @@ void SettingsManager::SetSettings(std::string settings_key, json new_settings, b
|
||||
}
|
||||
}
|
||||
|
||||
if(local_setting && from_server)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if(!local_setting && ResourceManager::get()->IsLocalClient() && (ResourceManager::get()->GetLocalClient()->GetSupportsSettingsManagerAPI()))
|
||||
{
|
||||
/*-------------------------------------------------*\
|
||||
@@ -299,7 +309,7 @@ void SettingsManager::SetSettings(std::string settings_key, json new_settings, b
|
||||
|
||||
ResourceManager::get()->GetLocalClient()->SettingsManager_SetSettings(settings_json.dump());
|
||||
}
|
||||
else if(!from_server)
|
||||
else
|
||||
{
|
||||
mutex.lock();
|
||||
json filtered_settings = FilterSettingsAgainstSchema(settings_key, new_settings);
|
||||
|
||||
Reference in new issue
Block a user