nextcloud-server/apps/files_sharing/lib
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
..
Activity
AppInfo
BackgroundJob
Collaboration
Command
Config
Controller fix(sharing): Allow reasonable control 4 'Hide download' on fed shares 2025-11-28 13:42:45 +07:00
Event
Exceptions
External
Listener
Middleware
Migration
Notification
Settings
ShareBackend
Cache.php
Capabilities.php
DefaultPublicShareTemplateProvider.php
DeleteOrphanedSharesJob.php
ExpireSharesJob.php
Helper.php
Hooks.php
ISharedMountPoint.php
ISharedStorage.php
MountProvider.php
OrphanHelper.php
ResponseDefinitions.php
Scanner.php
SharedMount.php
SharedStorage.php
SharesReminderJob.php
Updater.php
ViewOnly.php