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

Fix file drop shared folders #1224

Merged
merged 1 commit into from
Feb 25, 2021
Merged

Conversation

danxuliu
Copy link
Member

Fixes #923

When ACL is enabled the READ permission is required to get any other permission on the group folder (or its contents). However, the ACLCacheWrapper verified not only that the READ permission was enabled for the folder/file, but also that it was being requested. Due to this it was not possible to publicly upload a file to a file drop shared folder inside a group folder, as in that case only SHARE + CREATE permissions are requested.

Reviewers: note that I know nothing about group folders, caches or storages, so please review carefully :-)

How to test

  • Open the settings for group folders
  • Create a group folder for a group of the current user
  • Enable ACL
  • Open the Files app
  • Enter in the group folder
  • Create a new folder
  • Share the new folder by link
  • Set the link share to "File drop (upload only)"
  • Copy the link
  • In a private window, open the link
  • Upload a file

Result with this pull request

The file is uploaded.

Result without this pull request

The file fails to upload. The web console shows an internal error in the upload request (Nextcloud logs show Call to a member function getType() on boolean, maybe a check for rootInfo should be added there too to handle such errors more gracefully?).

When ACL is enabled the READ permission is required to get any other
permission on the group folder (or its contents). However, the
ACLCacheWrapper verified not only that the READ permission was enabled
for the folder/file, but also that it was being requested. Due to this
it was not possible to publicly upload a file to a file drop shared
folder inside a group folder, as in that case only SHARE + CREATE
permissions are requested.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
@danxuliu danxuliu added bug 3. to review Items that need to be reviewed labels Jan 11, 2021
@danxuliu
Copy link
Member Author

/backport to stable20

@danxuliu
Copy link
Member Author

/backport to stable19

@danxuliu
Copy link
Member Author

/backport to stable18

Copy link
Member

@ChristophWurst ChristophWurst left a comment

Choose a reason for hiding this comment

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

Customer says this works well in production

@danxuliu
Copy link
Member Author

/backport to stable21

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Items that need to be reviewed bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"File Drop" error
2 participants