aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib/ViewOnly.php
Commit message (Collapse)AuthorAgeFilesLines
* fix: Adjust preview for view-only sharesfix/view-only-previewFerdinand Thiessen2024-10-281-10/+3
| | | | | | | | | | | | | | | | | 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>
* refactor(apps): Use constructor property promotion when possibleprovokateurin2024-10-211-5/+3
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* chore(apps): Apply new rector configuration to autouse classesCôme Chilliet2024-10-151-1/+1
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* chore: Add SPDX headerAndy Scherzinger2024-06-061-17/+3
| | | | Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
* Fix view-only code after code review commentsVincent Petry2022-07-281-4/+9
| | | | Signed-off-by: Vincent Petry <vincent@nextcloud.com>
* Add share attributes + prevent download permissionVincent Petry2022-07-281-0/+116
Makes it possible to store download permission Signed-off-by: Vincent Petry <vincent@nextcloud.com>