nextcloud-server/apps/files_sharing/tests
nfebe 8725129312 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-28 13:42:45 +07:00
..
Collaboration fix(autocomplete): Move known array keys to psalm docs 2024-09-18 11:40:45 +07:00
Command fix(sharing): add command to fix broken shares after ownership transferring 2024-11-18 21:24:23 +07:00
Controller fix(sharing): Allow reasonable control 4 'Hide download' on fed shares 2025-11-28 13:42:45 +07:00
External feat(federatedfilesharing): auto-accept shares from trusted servers 2025-01-09 12:54:51 +07:00
Listener test: files_sharing add test for LoadAdditionalListener 2025-06-10 09:00:12 +07:00
Middleware chore(apps): Apply new rector configuration to autouse classes 2024-10-15 10:40:25 +07:00
Migration refactor(apps): Use constructor property promotion when possible 2024-10-21 12:37:59 +07:00
ApiTest.php feat(files_sharing): Toggle display for trusted server shares 2025-08-01 12:18:36 +07:00
ApplicationTest.php Merge pull request #44967 from nextcloud/perf/sharing-events 2024-06-10 11:57:53 +07:00
CacheTest.php test: add test for shared storage root being changed after watcher 2025-02-11 20:35:46 +07:00
CapabilitiesTest.php fix(files_sharing): Implementation conditional federation placeholder 2025-08-20 00:25:35 +07:00
DeleteOrphanedSharesJobTest.php refactor(apps): Use constructor property promotion when possible 2024-10-21 12:37:59 +07:00
EncryptedSizePropagationTest.php chore: Add SPDX header 2024-06-06 22:53:41 +07:00
EtagPropagationTest.php refactor(apps): Use constructor property promotion when possible 2024-10-21 12:37:59 +07:00
ExpireSharesJobTest.php refactor(apps): Use constructor property promotion when possible 2024-10-21 12:37:59 +07:00
ExternalStorageTest.php chore(apps): Apply new rector configuration to autouse classes 2024-10-15 10:40:25 +07:00
GroupEtagPropagationTest.php chore(apps): Apply new rector configuration to autouse classes 2024-10-15 10:40:25 +07:00
HelperTest.php chore(apps): Apply new rector configuration to autouse classes 2024-10-15 10:40:25 +07:00
LockingTest.php chore(apps): Apply new rector configuration to autouse classes 2024-10-15 10:40:25 +07:00
MountProviderTest.php chore(apps): Apply new rector configuration to autouse classes 2024-10-15 10:40:25 +07:00
PropagationTestCase.php refactor(apps): Use constructor property promotion when possible 2024-10-21 12:37:59 +07:00
ShareTest.php refactor(apps): Use constructor property promotion when possible 2024-10-21 12:37:59 +07:00
SharedMountTest.php chore(apps): Apply new rector configuration to autouse classes 2024-10-15 10:40:25 +07:00
SharedStorageTest.php test: add test for permissions of copied share 2024-12-04 19:19:08 +07:00
SharesReminderJobTest.php chore(deps): Update nextcloud/coding-standard to v1.3.1 2024-09-19 14:21:20 +07:00
SizePropagationTest.php chore(apps): Apply new rector configuration to autouse classes 2024-10-15 10:40:25 +07:00
TestCase.php refactor(apps): Use constructor property promotion when possible 2024-10-21 12:37:59 +07:00
UnshareChildrenTest.php chore(apps): Apply new rector configuration to autouse classes 2024-10-15 10:40:25 +07:00
UpdaterTest.php chore(apps): Apply new rector configuration to autouse classes 2024-10-15 10:40:25 +07:00
WatcherTest.php refactor(apps): Use constructor property promotion when possible 2024-10-21 12:37:59 +07:00