nextcloud-server/apps/files_sharing/tests
nfebe 299662e05d fix(sharing): Allow reasonable control 4 'Hide download' on fed shares
When creating public links from federated shares, users should be able to set
the 'Hide download' option independently as long as they are more restrictive
than the original share permissions.

Previously, the `checkInheritedAttributes` method was ignoring user preferences
and always overriding the hideDownload setting based solely on inherited
permissions, preventing users from disabling downloads even when the parent
share allowed them.

This fix implements some sort of inheritance logic:
- Users can only be MORE restrictive than parent shares, never LESS restrictive
- If parent hides downloads -> child MUST hide downloads (enforced)
- If parent allows downloads -> child can CHOOSE to hide or allow downloads
- If parent forbids downloads entirely -> child cannot enable downloads

Signed-off-by: nfebe <fenn25.fn@gmail.com>
2025-11-04 14:03:06 +07:00
..
Collaboration
Command
Controller
External
Listener
Middleware
Migration
ApiTest.php
ApplicationTest.php
CacheTest.php
CapabilitiesTest.php
DeleteOrphanedSharesJobTest.php
EncryptedSizePropagationTest.php
EtagPropagationTest.php
ExpireSharesJobTest.php
ExternalStorageTest.php
GroupEtagPropagationTest.php
HelperTest.php
LockingTest.php
MountProviderTest.php
PropagationTestCase.php
ShareTest.php
SharedMountTest.php
SharedStorageTest.php
SharesReminderJobTest.php
SizePropagationTest.php
TestCase.php
UnshareChildrenTest.php
UpdaterTest.php
WatcherTest.php