Sync Document creation w/Permission
Hey, trying to create a sync doc and assign access permissions when using ACLs from a server. But it looks like I'm getting a race condition where our websocket js client is seeing it create and trying to access it in the ... second? before permissions are assigned?
then the js seems to quit trying (bc it was denied no reason to keep asking, i get it), even though it would now have permissions?
I'm not seeing anything in Document.creator() that would let me pass a DocumentPermission object in to create with-permissions immediately? is there a way for that?
Best Answer
-
Hey @attriel . There is no way to create object with predefined set of extended permissions, by default permissions always presume that only the originating identity has access to a Sync object. So short answer to your question is "no, there is no way to pass permissions to Document.creator".
Depending on how you built the notification to the websocket JS client, it might be possible (as a workaround) to notify the client only when the permissions are assigned to the Sync object by your server.
Answers
Categories
- 83 All Categories
- 19 SIGNAL 2021
- 376 Product Discussions
- 7 Community - Announcements
- 2 Changelog
- 4 Forum UI Updates
- 8 Welcome Guide
- 6 Community - Events
- 2 Twilio Relay Developer Conference 2021 Mega Thread
- 1 External Community Events
- 25 Inspiration
- 17 Community - Other Discussions
- 1 Community- Twilio Startups