Hello,
is this allowed ? :
await window.safeMutableDataPermissionsSet.setAllow(permSet, ‘Insert’, ‘Update’ );
or should we do :
await window.safeMutableDataPermissionsSet.setAllow(permSet, [‘Insert’,‘Update’] );
or should we split this in 2 lines before applying ? I seem to have an issue with non owners being unable to update keys.
Specifically, after having setup a public mutable with what I think sets permissions for public : Insert and Update:
// allowing the user to perform the Insert operation
await window.safeMutableDataPermissionsSet.setAllow(permSet, PERMISSIONS.INSERT ); // ???
// setting the handle as null, anyone can perform the Insert and update operation
await window.safeMutableData.setUserPermissions(this.topicsMutableData, null, permSet, 1);
// allowing the user to perform the Update operation
await window.safeMutableDataPermissionsSet.setAllow(permSet, PERMISSIONS.UPDATE ); // ????
await window.safeMutableData.setUserPermissions(this.topicsMutableData, null, permSet, 2);
I get a nasty :
Error: Core error: Routing client error → Access denied
when a non owner tries to update one of the keys in the mutable.
The error message is a bit vague : are we denied access because the mutable was set badly ? Or is it because the app is not authorized correctly ?