[stable24] Add share attributes + prevent download permission#33416
[stable24] Add share attributes + prevent download permission#33416
Conversation
| throw new OCSBadRequestException('Direct download only works for files'); | ||
| } | ||
|
|
||
| $event = new BeforeDirectFileDownloadEvent($userFolder->getRelativePath($file->getPath())); |
Check notice
Code scanning / Psalm
PossiblyNullArgument
| if (count($nodes) > 0) { | ||
| $node = $nodes[0]; | ||
| $storage = $node->getStorage(); | ||
| if ($storage && $storage->instanceOfStorage(SharedStorage::class)) { |
Check notice
Code scanning / Psalm
RedundantConditionGivenDocblockType
59c17bc to
acb4550
Compare
|
@CarlSchwan can you take care of the conflicts ? |
acb4550 to
483b389
Compare
Makes it possible to store download permission Signed-off-by: Vincent Petry <[email protected]>
Signed-off-by: Vincent Petry <[email protected]>
Signed-off-by: Vincent Petry <[email protected]>
Signed-off-by: Vincent Petry <[email protected]>
When not specified in the OCS call, don't reset the share attributes. Signed-off-by: Vincent Petry <[email protected]>
Signed-off-by: Vincent Petry <[email protected]>
Added download permission checkbox in frontend Added share attributes parsing and setting in frontend. Signed-off-by: Vincent Petry <[email protected]>
Signed-off-by: Julius Härtl <[email protected]>
Signed-off-by: Vincent Petry <[email protected]>
Signed-off-by: Vincent Petry <[email protected]>
When resharing by link, if the download permission was removed through share attributes, convert it to the hide download flag. Signed-off-by: Vincent Petry <[email protected]>
Signed-off-by: Carl Schwan <[email protected]>
- Fix tests - Use non deprecated event stuff - Add a bit of type hinting to the new stuff - More safe handling of instanceOfStorage (share might not be the first wrapper) - Fix resharing Signed-off-by: Carl Schwan <[email protected]>
Signed-off-by: Julius Härtl <[email protected]>
483b389 to
13886b1
Compare
Signed-off-by: Carl Schwan <[email protected]>
13886b1 to
843b54e
Compare
PVince81
left a comment
There was a problem hiding this comment.
See comments
I only reviewed starting at the commit "Multiple fixes" as it seems to be post-backport. Let me know if there's more
Can you confirm that the scenarios you needed to fix (ex: before zip download) still work ?
I tested a few things and that still works |
|
@juliushaertl backport is merged, you can update/merge the office counterparts |
backport of #32482