Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove re-sharing option for items in ocis share jail #1353

Closed
felix-schwarz opened this issue Apr 30, 2024 · 1 comment · Fixed by #1354
Closed

Remove re-sharing option for items in ocis share jail #1353

felix-schwarz opened this issue Apr 30, 2024 · 1 comment · Fixed by #1354
Assignees

Comments

@felix-schwarz
Copy link
Contributor

Re-sharing has been removed from ocis and ocis-web:

While the ocis server should not send the R (re-sharing) permission for items in the Shares Jail, I've been told that it's not entirely impossible, either - and that therefore the client should take measures beyond interpreting the returned permissions to no longer offer sharing for a file shared with the user.

Technically, this could be solved with OCItem not returning the re-sharing permission bit through its properties if it determines it is located in the Shares Jail. This, however, would come at a performance cost whenever permissions are checked for an OCItem.

A more efficient solution, then, is to take advantage of the Action subsystem's ability to let actions themselves control for which items they want to appear - and in which location.

The CollaborateAction (which is responsible for sharing) then can simply check the Drive ID (Space ID) of the OCItem to determine if the item is located in the Shares Jail. If it is OCDriveIDSharesJail (a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668), the item is located in the Shares Jail and Sharing options should no longer be presented for the item.

@felix-schwarz
Copy link
Contributor Author

Done via #1354.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants