-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
[stable24] Add share attributes + prevent download permission #33416
Conversation
@@ -99,6 +107,13 @@ | |||
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@juliushaertl backport is merged, you can update/merge the office counterparts |
backport of #32482