removeFolderShare(path, user)
Removes / terminates a user's access to a specific folder.
Parameters
pathstringrequiredAbsolute path to folder to remove a user from.
userstring (email)requiredEmail to user to remove access.
Returns
An object { Success: true, Message: "", ResultCode: 0 } when the share is removed — test result.Success, not result === true. Throws "No such share!" (error 1) if the user has no share there (also when the email is not a Docly user or the share was already removed; the public everyone share is never touched), error -2 if the site's publisher may not invite users there or tries to end an administrator's access without being administrator, error 2 if it would end your own access while no one else is administrator, error 3 for the workspace owner, and error 101 for an invalid email. Returns null if the folder is not found. The call runs as the site's publisher.
Example
docly.removeFolderShare("/", "test@docly.net");