Skip to content

Commit 5c51164

Browse files
nfebeartonge
andauthored
Update apps/files_sharing/lib/Controller/ShareAPIController.php
Co-authored-by: Louis <louis@chmn.me> Signed-off-by: F. E Noel Nfebe <fenn25.fn@gmail.com>
1 parent 6c9b2e3 commit 5c51164

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

apps/files_sharing/lib/Controller/ShareAPIController.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2161,11 +2161,7 @@ private function checkInheritedAttributes(IShare $share): void {
21612161
// 1. If parent hides download, child must hide download
21622162
// 2. If parent allows download, child can choose to hide or allow
21632163
// 3. If parent forbids download, child cannot allow download
2164-
if ($parentHidesDownload) {
2165-
$hideDownload = true; // Parent forces hide, child cannot override
2166-
} else {
2167-
$hideDownload = $userExplicitlySetHideDownload; // Respect user's choice when parent allows
2168-
}
2164+
$hideDownload = $parentHidesDownload || $userExplicitlySetHideDownload
21692165

21702166
$canDownload = $canDownload || $parentAllowsDownload;
21712167

0 commit comments

Comments
 (0)