Fixed check for if script permission is enabled

This commit is contained in:
ksuprynowicz 2024-04-17 00:45:57 +02:00
parent 95406c44c6
commit 5aac93352c

View file

@ -43,6 +43,9 @@ bool ScriptPermissions::isCurrentScriptAllowed(ScriptPermissions::Permission per
int permissionIndex = static_cast<int>(permission);
// Check if the permission checking is active
Setting::Handle<bool> isCheckingEnabled(scriptPermissionSettingEnableKeyNames[permissionIndex], scriptPermissionSettingEnableDefaultValues[permissionIndex]);
if (!isCheckingEnabled.get()) {
return true;
}
// Get the script manager:
auto engine = Scriptable::engine();
if (!engine) {