Commit 5ed3db9
committed
fix(share_api): Respect requested permissions or error out
The share API currently always adds read permissions sent in share request with the argument that
all shares must have read permissions. That this not true as link and email shares allowed not to.
In addition to the above, there is a check that ensures any share which is not a link or email share
must have read permissions. There is also protection for legacy integrations where if no permissions are sent
at all default permissions are set.
So it does not make sense to make any sort of additions to the permissions that a client has sent, as the
response would be different from what the client expects.
Signed-off-by: nfebe <fenn25.fn@gmail.com>1 parent fbfe307 commit 5ed3db9
File tree
2 files changed
+2
-10
lines changed- apps/files_sharing/lib/Controller
- build/integration/sharing_features
2 files changed
+2
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
645 | 645 | | |
646 | 646 | | |
647 | 647 | | |
648 | | - | |
649 | | - | |
650 | | - | |
651 | 648 | | |
652 | 649 | | |
653 | 650 | | |
| |||
729 | 726 | | |
730 | 727 | | |
731 | 728 | | |
732 | | - | |
733 | | - | |
734 | | - | |
735 | | - | |
736 | | - | |
737 | 729 | | |
738 | 730 | | |
739 | 731 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
219 | | - | |
| 219 | + | |
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
| |||
267 | 267 | | |
268 | 268 | | |
269 | 269 | | |
270 | | - | |
| 270 | + | |
271 | 271 | | |
272 | 272 | | |
273 | 273 | | |
| |||
0 commit comments