nextcloud-server/core/Controller
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
..
AppPasswordController.php chore(deps): Update nextcloud/coding-standard to v1.3.1 2024-09-19 14:21:20 +07:00
AutoCompleteController.php style: update codestyle for coding-standard 1.2.3 2024-08-25 19:34:58 +07:00
AvatarController.php style: update codestyle for coding-standard 1.2.3 2024-08-25 19:34:58 +07:00
CSRFTokenController.php refactor(core): Replace security annotations with respective attributes 2024-07-26 07:30:45 +07:00
ClientFlowLoginController.php chore(deps): Update nextcloud/coding-standard to v1.3.1 2024-09-19 14:21:20 +07:00
ClientFlowLoginV2Controller.php chore(deps): Update nextcloud/coding-standard to v1.3.1 2024-09-19 14:21:20 +07:00
CollaborationResourcesController.php refactor(core): Replace security annotations with respective attributes 2024-07-26 07:30:45 +07:00
ContactsMenuController.php refactor(core): Replace security annotations with respective attributes 2024-07-26 07:30:45 +07:00
CssController.php chore(deps): Update nextcloud/coding-standard to v1.3.1 2024-09-19 14:21:20 +07:00
ErrorController.php refactor(core): Replace security annotations with respective attributes 2024-07-26 07:30:45 +07:00
GuestAvatarController.php fix(core): Limit valid avatar sizes 2024-08-14 09:29:30 +07:00
HoverCardController.php refactor(core): Replace security annotations with respective attributes 2024-07-26 07:30:45 +07:00
JsController.php chore(deps): Update nextcloud/coding-standard to v1.3.1 2024-09-19 14:21:20 +07:00
LoginController.php refactor(core): Make all attribute arguments named 2024-07-27 22:36:18 +07:00
LostController.php style: update codestyle for coding-standard 1.2.3 2024-08-25 19:34:58 +07:00
NavigationController.php refactor(core): Replace security annotations with respective attributes 2024-07-26 07:30:45 +07:00
OCJSController.php chore(legacy): Introduce public version ct plass and drop version methods from OC_Util 2024-09-20 14:53:34 +07:00
OCMController.php chore(deps): Update nextcloud/coding-standard to v1.3.1 2024-09-19 14:21:20 +07:00
OCSController.php chore(legacy): Introduce public version ct plass and drop version methods from OC_Util 2024-09-20 14:53:34 +07:00
PreviewController.php fix: Adjust preview for view-only shares 2024-10-28 15:52:27 +07:00
ProfileApiController.php refactor(core): Make all attribute arguments named 2024-07-27 22:36:18 +07:00
ProfilePageController.php refactor(core): Replace security annotations with respective attributes 2024-07-26 07:30:45 +07:00
RecommendedAppsController.php refactor(core): Replace security annotations with respective attributes 2024-07-26 07:30:45 +07:00
ReferenceApiController.php refactor(core): Replace security annotations with respective attributes 2024-07-26 07:30:45 +07:00
ReferenceController.php refactor(core): Replace security annotations with respective attributes 2024-07-26 07:30:45 +07:00
SetupController.php chore(deps): Update nextcloud/coding-standard to v1.3.1 2024-09-19 14:21:20 +07:00
TaskProcessingApiController.php chore(deps): Bump nextcloud/coding-standard in /vendor-bin/cs-fixer 2024-10-19 07:57:35 +07:00
TeamsApiController.php fix(core): use OC namespace for core ReponseDefinitions instead of OCA 2024-07-15 11:50:02 +07:00
TextProcessingApiController.php chore(deps): Bump nextcloud/coding-standard in /vendor-bin/cs-fixer 2024-10-19 07:57:35 +07:00
TextToImageApiController.php chore: adjust code to adhere to coding standard 2024-09-05 21:23:38 +07:00
TranslationApiController.php refactor(core): Make all attribute arguments named 2024-07-27 22:36:18 +07:00
TwoFactorChallengeController.php style: update codestyle for coding-standard 1.2.3 2024-08-25 19:34:58 +07:00
UnifiedSearchController.php refactor(core): Replace security annotations with respective attributes 2024-07-26 07:30:45 +07:00
UnsupportedBrowserController.php refactor(core): Replace security annotations with respective attributes 2024-07-26 07:30:45 +07:00
UserController.php refactor(core): Replace security annotations with respective attributes 2024-07-26 07:30:45 +07:00
WalledGardenController.php refactor(core): Replace security annotations with respective attributes 2024-07-26 07:30:45 +07:00
WebAuthnController.php refactor(core): Replace security annotations with respective attributes 2024-07-26 07:30:45 +07:00
WellKnownController.php style: update codestyle for coding-standard 1.2.3 2024-08-25 19:34:58 +07:00
WhatsNewController.php chore(legacy): Introduce public version ct plass and drop version methods from OC_Util 2024-09-20 14:53:34 +07:00
WipeController.php refactor(core): Make all attribute arguments named 2024-07-27 22:36:18 +07:00