From 6c278bf2eeb670f5ee6a1fbcfc07668e7f75ca2a Mon Sep 17 00:00:00 2001 From: Gaurav Soni Date: Mon, 28 Sep 2026 16:01:15 +0200 Subject: [PATCH] fix: OCISDEV-1438 hide Shared via link tab when public sharing is disabled (#13005) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Shares navigation (desktop tab list and mobile drop-down) always offered a "Shared via link" entry, even when public link sharing was disabled for the account — for example in the Vault, where the backend rejects public link creation and the capability `files_sharing.public.enabled` reports `false`. The entry led to a page that could never contain anything. The Shares navigation now hides the "Shared via link" entry whenever `files_sharing.public.enabled` is `false`. Anyone who still reaches the via-link route directly, including through the legacy `/list/shared-via-link` redirect, is redirected to "Shared with me" at navigation time, keeping the current route scope (e.g. `vault`) intact. When public sharing is enabled, all three entries behave as before. PR: https://github.com/owncloud/ocis/pull/13005 --- ...d-via-link-when-public-sharing-disabled.md | 17 +++++ .../components/AppBar/SharesNavigation.vue | 29 +++++--- .../src/views/shares/SharedViaLink.vue | 22 +++++- .../AppBar/SharesNavigation.spec.ts | 35 ++++++++- .../unit/views/shares/SharedViaLink.spec.ts | 72 ++++++++++++++++--- 5 files changed, 148 insertions(+), 27 deletions(-) create mode 100644 changelog/unreleased/fix-hide-shared-via-link-when-public-sharing-disabled.md diff --git a/changelog/unreleased/fix-hide-shared-via-link-when-public-sharing-disabled.md b/changelog/unreleased/fix-hide-shared-via-link-when-public-sharing-disabled.md new file mode 100644 index 00000000000..b20e8039963 --- /dev/null +++ b/changelog/unreleased/fix-hide-shared-via-link-when-public-sharing-disabled.md @@ -0,0 +1,17 @@ +Bugfix: Hide "Shared via link" when public sharing is disabled + +The Shares navigation (the desktop tab list and the mobile drop-down) always +offered a "Shared via link" entry, even when public link sharing was disabled +for the account — for example in the Vault, where the backend rejects public +link creation and the capability `files_sharing.public.enabled` reported +`false`. The entry led to a page that could never contain anything. + +The Shares navigation was changed to hide the "Shared via link" entry +whenever `files_sharing.public.enabled` is `false`. Anyone who still reached +the via-link route directly, including through the legacy +`/list/shared-via-link` redirect, was redirected to "Shared with me" at +navigation time, keeping the current route scope (e.g. `vault`) intact. When +public sharing was enabled, all three Shares navigation entries continued to +behave exactly as before. + +https://github.com/owncloud/ocis/pull/13005 diff --git a/web/packages/web-app-files/src/components/AppBar/SharesNavigation.vue b/web/packages/web-app-files/src/components/AppBar/SharesNavigation.vue index 0379f233716..71e55f78b01 100644 --- a/web/packages/web-app-files/src/components/AppBar/SharesNavigation.vue +++ b/web/packages/web-app-files/src/components/AppBar/SharesNavigation.vue @@ -42,21 +42,24 @@ diff --git a/web/packages/web-app-files/src/views/shares/SharedViaLink.vue b/web/packages/web-app-files/src/views/shares/SharedViaLink.vue index 09242bd308d..7f541893cd4 100644 --- a/web/packages/web-app-files/src/views/shares/SharedViaLink.vue +++ b/web/packages/web-app-files/src/views/shares/SharedViaLink.vue @@ -1,5 +1,5 @@