revert: do not unify hide-download and prevent-download permissions

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
This commit is contained in:
Ferdinand Thiessen 2025-04-14 14:50:24 +02:00
parent a799d8dccf
commit 47d1afbb7f
No known key found for this signature in database
GPG key ID: 45FAE7268762B400

View file

@ -1293,16 +1293,11 @@ class ShareAPIController extends OCSController {
|| $share->getShareType() === IShare::TYPE_EMAIL) {
// Update hide download state
$attributes = $share->getAttributes() ?? $share->newAttributes();
if ($hideDownload === 'true') {
$share->setHideDownload(true);
$attributes->setAttribute('permissions', 'download', false);
} elseif ($hideDownload === 'false') {
$share->setHideDownload(false);
$attributes->setAttribute('permissions', 'download', true);
}
$share->setAttributes($attributes);
// If either manual permissions are specified or publicUpload
// then we need to also update the permissions of the share