nextcloud-server/apps/files_sharing/tests
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 +07:00
..
Collaboration fix(autocomplete): Move known array keys to psalm docs 2024-09-18 11:40:45 +07:00
Command refactor(apps): Use constructor property promotion when possible 2024-10-21 12:37:59 +07:00
Controller fix: Adjust preview for view-only shares 2024-10-28 15:52:27 +07:00
External refactor(apps): Use constructor property promotion when possible 2024-10-21 12:37:59 +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 fix(files_sharing): Cleanup error messages 2024-10-28 09:07:41 +07:00
ApplicationTest.php Merge pull request #44967 from nextcloud/perf/sharing-events 2024-06-10 11:57:53 +07:00
CacheTest.php refactor(apps): Use constructor property promotion when possible 2024-10-21 12:37:59 +07:00
CapabilitiesTest.php refactor: Add void return type to PHPUnit test methods 2024-09-15 22:32:31 +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 refactor(apps): Use constructor property promotion when possible 2024-10-21 12:37:59 +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