From 8090b7eb2d8a4687cc67ce295b8e386bde418d05 Mon Sep 17 00:00:00 2001 From: Jannik Stehle Date: Tue, 7 Nov 2023 09:30:33 +0100 Subject: [PATCH] fix: resolving private links to share jail via its id --- changelog/unreleased/bugfix-resolving-via-share-jail-id | 6 ++++++ packages/web-runtime/src/pages/resolvePrivateLink.vue | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 changelog/unreleased/bugfix-resolving-via-share-jail-id diff --git a/changelog/unreleased/bugfix-resolving-via-share-jail-id b/changelog/unreleased/bugfix-resolving-via-share-jail-id new file mode 100644 index 00000000000..7891011ab5e --- /dev/null +++ b/changelog/unreleased/bugfix-resolving-via-share-jail-id @@ -0,0 +1,6 @@ +Bugfix: Private link resolving via share jail ID + +Resolving private links via the share jail ID has been fixed. + +https://github.com/owncloud/web/pull/9913 +https://github.com/owncloud/web/issues/9867 diff --git a/packages/web-runtime/src/pages/resolvePrivateLink.vue b/packages/web-runtime/src/pages/resolvePrivateLink.vue index 3d3b5e0a16c..3a01f61a5a3 100644 --- a/packages/web-runtime/src/pages/resolvePrivateLink.vue +++ b/packages/web-runtime/src/pages/resolvePrivateLink.vue @@ -60,7 +60,7 @@ import { unref, defineComponent, computed, onMounted, ref, Ref } from 'vue' import { dirname } from 'path' import { createFileRouteOptions, useGetResourceContext } from '@ownclouders/web-pkg' import { useTask } from 'vue-concurrency' -import { isShareSpaceResource, Resource } from '@ownclouders/web-client/src/helpers' +import { isShareSpaceResource, Resource, SHARE_JAIL_ID } from '@ownclouders/web-client/src/helpers' import { RouteLocationNamedRaw } from 'vue-router' import { useGettext } from 'vue3-gettext' @@ -91,6 +91,10 @@ export default defineComponent({ const resolvePrivateLinkTask = useTask(function* (signal, id) { try { + if (id === `${SHARE_JAIL_ID}$${SHARE_JAIL_ID}!${SHARE_JAIL_ID}`) { + return router.push(createLocationShares('files-shares-with-me')) + } + const result = yield getResourceContext(id) const { space, resource } = result let { path } = result