FORUM CTRLX AUTOMATION
ctrlX World Partner Apps for ctrlX AUTOMATION
02-29-2024 03:48 PM
Hi,
I have a question regarding scope update. We can create scopes by using:
result, scope_result = self._client.create_sync("datalayer/security/scopes", variant)
In case our scope already exists the result is Result.ALREADY_EXISTS even if the permissions inside the scopes have changed and only the scope name is the same. Is there a method to check if the contents of the scope is changed? Or what approach should I use?
Best regards,
Criss 🙂
Solved! Go to Solution.
03-01-2024 07:15 AM
Hi Chriss,
you could implement a logic, after you get the result "ALREADY_EXISTS", that does a Data Layer Read to "datalayer/security/scopes/<your_scopename>" and checks if the content matches what you are expecting.
Or you can also keep it simpler and just send a write to "datalayer/security/scopes/<your_scopename>" and overwrite the value at the scope.
Best regards,
Nick