Lost permission when received multiple shares on the same resource
- Dominant language
- Go
- Stars
- 2.1k
- Forks
- 274
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 103
Description
## Describe the bug
- userA creates a folder with a txt file in it
- userA shares that folder with userB with "Can edit" permissions
- userA shares that same folder to some groups which userB is a member of with "Can view" permissions
- userB opens the file in the shared folder for editing and make some changes
- userB tries to save that file -> an error messages is displayed "share does not grant InitiateFileUpload permission"
see attached video:
[Screencast_20240215_153045-1.webm](https://github.com/owncloud/ocis/assets/373399/2e50cff3-28e4-4927-9af0-b3cfa3bdac35)
I think the bug is in the sharestorageprovider, it only the permissions on the single share which the upload was tried on(https://github.com/cs3org/reva/blob/edge/internal/grpc/services/sharesstorageprovider/sharesstorageprovider.go#L243). But there might be more shares for the same resource giving different permissions.
Ideally we would not need to do that check in the sharestorageprovider and just forward the request to the "real" storageprovider. It should deal with it accordingly.
Contributor guide
Assessment
This issue has not been assessed yet.