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

[stable17] Fix federated link sharing permissions #21587

Conversation

danxuliu
Copy link
Member

Backport of #20726

Follow up to #21110

If a link share has read permissions it may have too share permissions (depending on whether federated shares are allowed or not). Therefore the share permission needs to be ignored when checking the permissions to determine the public upload status.

Due to this the radio buttons for Read only and Allow upload and editing in the share menu of a folder shared by link will not be checked (except if they are selected again due to how the update and the rendering of the menu works, but after reloading the page they will be gone). File drop (upload only), on the other hand, is properly checked, as in that case the share does not have read permissions and thus the share permission is not set.

How to test

  • Enable Allow users on this server to send shares to other servers in the Sharing administration settings
  • Create a new directory
  • Share the directory by link
  • Open the share menu

Result with this pull request

The radio button for Read only is checked.

Result without this pull request

No radio button is checked.

If a link share has read permissions it may have too share permissions
(depending on whether federated shares are allowed or not). Therefore
the share permission needs to be ignored when checking the permissions
to determine the public upload status.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Copy link
Member

@rullzer rullzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙈

@rullzer
Copy link
Member

rullzer commented Jul 2, 2020

@danxuliu you reviewed and tested yourself as well right? BEcause then just get it in ;)

@danxuliu
Copy link
Member Author

danxuliu commented Jul 3, 2020

@danxuliu you reviewed and tested yourself as well right? BEcause then just get it in ;)

Yes, I did. Let's hope I did not miss anything :-P

@rullzer rullzer merged commit 04d1f76 into stable17 Jul 4, 2020
@rullzer rullzer deleted the backport/20726/stable17-fix-federated-link-sharing-permissions branch July 4, 2020 06:54
@rullzer rullzer mentioned this pull request Jul 6, 2020
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants