nextcloud/apps/files_sharing/lib
Ferdinand Thiessen c84c256261
fix: Adjust preview for view-only shares
Previously there was a different behavior for public shares (link-shares) and internal shares,
if the user disabled the view permission.
The legacy UI for public shares simply "disabled" the context menu and hided all download actions.
With Nextcloud 31 all share types use the consistent permissions attributes,
which simplifies code, but caused a regression: Images can no longer been viewed.

Because on 30 and before the attribute was not set, previews for view-only files
were still allowed. Now with 31 we need a new way to allow "viewing" shares.

So this is allowing previews for those files, but only for internal usage.
This is done by settin a special header, which only works with custom requests,
and not by opening the URL directly.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-10-28 15:52:27 +01:00
..
Activity refactor(apps): Use constructor property promotion when possible 2024-10-21 12:37:59 +02:00
AppInfo chore(apps): Apply new rector configuration to autouse classes 2024-10-15 10:40:25 +02:00
BackgroundJob chore(db): Correctly apply query types 2024-10-17 09:21:07 +02:00
Collaboration refactor(apps): Use constructor property promotion when possible 2024-10-21 12:37:59 +02:00
Command refactor(apps): Use constructor property promotion when possible 2024-10-21 12:37:59 +02:00
Controller fix: Adjust preview for view-only shares 2024-10-28 15:52:27 +01:00
Event refactor(apps): Use constructor property promotion when possible 2024-10-21 12:37:59 +02:00
Exceptions chore: Add SPDX header 2024-06-06 22:53:41 +02:00
External refactor(apps): Use constructor property promotion when possible 2024-10-21 12:37:59 +02:00
Listener refactor(apps): Use constructor property promotion when possible 2024-10-21 12:37:59 +02:00
Middleware refactor(apps): Use constructor property promotion when possible 2024-10-21 12:37:59 +02:00
Migration refactor(apps): Use constructor property promotion when possible 2024-10-21 12:37:59 +02:00
Notification refactor(apps): Use constructor property promotion when possible 2024-10-21 12:37:59 +02:00
Settings refactor(apps): Use constructor property promotion when possible 2024-10-21 12:37:59 +02:00
ShareBackend chore(db): Apply query prepared statements 2024-10-17 20:30:47 +02:00
Cache.php refactor(apps): Use constructor property promotion when possible 2024-10-21 12:37:59 +02:00
Capabilities.php refactor(apps): Use constructor property promotion when possible 2024-10-21 12:37:59 +02:00
DefaultPublicShareTemplateProvider.php chore(apps): Apply new rector configuration to autouse classes 2024-10-15 10:40:25 +02:00
DeleteOrphanedSharesJob.php refactor(apps): Use constructor property promotion when possible 2024-10-21 12:37:59 +02:00
ExpireSharesJob.php refactor(apps): Use constructor property promotion when possible 2024-10-21 12:37:59 +02:00
Helper.php refactor(apps): Use constructor property promotion when possible 2024-10-21 12:37:59 +02:00
Hooks.php chore(apps): Apply new rector configuration to autouse classes 2024-10-15 10:40:25 +02:00
ISharedMountPoint.php chore: Add SPDX header 2024-06-06 22:53:41 +02:00
ISharedStorage.php feat: Make ISharedStorage public API and reuse where possible 2024-08-12 11:42:10 +02:00
MountProvider.php refactor(apps): Use constructor property promotion when possible 2024-10-21 12:37:59 +02:00
OrphanHelper.php refactor(apps): Use constructor property promotion when possible 2024-10-21 12:37:59 +02:00
ResponseDefinitions.php revert: "fix(files_sharing): Make share labels nullable" 2024-10-14 15:16:25 +02:00
Scanner.php refactor(apps): Use constructor property promotion when possible 2024-10-21 12:37:59 +02:00
SharedMount.php refactor(apps): Use constructor property promotion when possible 2024-10-21 12:37:59 +02:00
SharedStorage.php refactor(Storage): Align all Storage constructors 2024-10-23 13:24:18 +02:00
SharesReminderJob.php chore(deps): Bump nextcloud/coding-standard in /vendor-bin/cs-fixer 2024-10-19 07:57:35 +02:00
Updater.php chore(apps): Apply new rector configuration to autouse classes 2024-10-15 10:40:25 +02:00
ViewOnly.php fix: Adjust preview for view-only shares 2024-10-28 15:52:27 +01:00