nextcloud/apps/files_sharing/tests
nfebe 64016898d5 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-10-23 16:09:21 +01:00
..
Collaboration chore: run rector 2025-07-01 22:45:52 +02:00
Command chore: run rector 2025-07-01 22:45:52 +02:00
Controller fix(sharing): Allow reasonable control 4 'Hide download' on fed shares 2025-10-23 16:09:21 +01:00
External refactor: Port External\Manager to the query builder 2025-09-16 11:36:12 +02:00
Listener fix(tests): Fix files_sharing tests conflicting with other tests 2025-06-10 15:38:43 +02:00
Middleware fix(tests): Turn data provider into a static method in OCSShareAPIMiddlewareTest 2025-09-27 13:05:33 +02:00
Migration refactor(dbal): Port away from remaining IQueryBuilder::execute calls 2025-10-13 13:44:15 +02:00
ApiTest.php refactor: use IEmailValidator.isValid instead of IMailer.validateEmailAddress 2025-10-04 21:54:22 +02:00
ApplicationTest.php fix(tests): Make sure data providers are static in files_sharing ApplicationTest 2025-09-27 13:05:32 +02:00
CacheTest.php chore: apply new CSFixer rules 2025-07-01 16:26:50 +02:00
CapabilitiesTest.php feat(preset): share link expiration date 2025-08-14 16:07:32 -01:00
DeleteOrphanedSharesJobTest.php chore: apply new CSFixer rules 2025-07-01 16:26:50 +02:00
EncryptedSizePropagationTest.php chore: apply new CSFixer rules 2025-07-01 16:26:50 +02:00
EtagPropagationTest.php chore: apply new CSFixer rules 2025-07-01 16:26:50 +02:00
ExpireSharesJobTest.php refactor(dbal): Port away from remaining IQueryBuilder::execute calls 2025-10-13 13:44:15 +02:00
ExternalStorageTest.php chore: run rector 2025-07-01 22:45:52 +02:00
GroupEtagPropagationTest.php chore: apply new CSFixer rules 2025-07-01 16:26:50 +02:00
HelperTest.php chore: apply new CSFixer rules 2025-07-01 16:26:50 +02:00
LockingTest.php chore: apply new CSFixer rules 2025-07-01 16:26:50 +02:00
MountProviderTest.php chore: run rector 2025-07-01 22:45:52 +02:00
PropagationTestCase.php chore: apply new CSFixer rules 2025-07-01 16:26:50 +02:00
SharedMountTest.php chore: run rector 2025-07-01 22:45:52 +02:00
SharedStorageTest.php chore: run rector 2025-07-01 22:45:52 +02:00
SharesReminderJobTest.php chore: run rector 2025-07-01 22:45:52 +02:00
ShareTest.php chore: run rector 2025-07-01 22:45:52 +02:00
SizePropagationTest.php chore: apply new CSFixer rules 2025-07-01 16:26:50 +02:00
TestCase.php refactor(dbal): Port away from remaining IQueryBuilder::execute calls 2025-10-13 13:44:15 +02:00
UnshareChildrenTest.php chore: apply new CSFixer rules 2025-07-01 16:26:50 +02:00
UpdaterTest.php chore: run rector 2025-07-01 22:45:52 +02:00
WatcherTest.php chore: apply new CSFixer rules 2025-07-01 16:26:50 +02:00