From 89510df3c40b2be598528773cd488de30fa11817 Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Thu, 3 Aug 2023 12:27:06 +0200 Subject: [PATCH] Disable "Create and copy public link to clipboard" for Spaces This feature didn't work correctly, users were always redirected to the web frontend. This menu item is now disabled, waiting for a new sharing API. --- src/gui/socketapi/socketapi.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/gui/socketapi/socketapi.cpp b/src/gui/socketapi/socketapi.cpp index aa008800881..ed1898e620c 100644 --- a/src/gui/socketapi/socketapi.cpp +++ b/src/gui/socketapi/socketapi.cpp @@ -904,7 +904,12 @@ void SocketApi::sendSharingContextMenuOptions(const FileData &fileData, SocketLi && !capabilities.sharePublicLinkEnforcePasswordForReadOnly(); if (canCreateDefaultPublicLink) { - listener->sendMessage(QStringLiteral("MENU_ITEM:COPY_PUBLIC_LINK") + flagString + tr("Create and copy public link to clipboard")); + if (fileData.folder->accountState()->supportsSpaces()) { + // TODO: See https://github.com/owncloud/client/issues/10845 : oCIS is getting a new sharing API, waiting for that before implementing a + // temporary solution. + } else { + listener->sendMessage(QStringLiteral("MENU_ITEM:COPY_PUBLIC_LINK") + flagString + tr("Create and copy public link to clipboard")); + } } else if (publicLinksEnabled) { listener->sendMessage(QStringLiteral("MENU_ITEM:MANAGE_PUBLIC_LINKS") + flagString + tr("Copy public link to clipboard")); }