Not receiving getChanges() events when owner revokes access to user
Hello,
I am having an issue writing a nodejs app using the box api.
Here is my situation.
The owner revokes access to folder F to USER A.
The issue is USER A doesn't get any "TRASH_ITEM" events when it then polls for changes when calling "getChanges" with a valid next_stream_position token. USER A only gets a "COLLAB_REMOVE_COLLABORATOR" event.
How am I suppose to handle the folders/files that USER A does not have access to anymore if I dont actually know what to delete? USER A cannot open any files/folders in F anymore.
My current workaround is to look at the "COLLAB_REMOVE_COLLABORATOR" and delete the subtree using the id and type given in the COLLAB_REMOVE_COLLABORATOR event (I save the path for my delete subtree). This works for now.
BUT if the owner gives access back to USER A to folder F, the getChanges() endpoint doesnt give any "ITEM_CREATES", "ITEM_CHANGES", etc only a "COLLAB_INVITE_COLLABORATOR". So now I won't be able to figure out which files/folders USER A can open/access as I dont have the id/types anymore.
How am I suppose to properly handle this situation?
Thanks
Please sign in to leave a comment.
Comments
0 comments