Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: resolving private links to share jail via its id #9913

Merged
merged 1 commit into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions changelog/unreleased/bugfix-resolving-via-share-jail-id
Original file line number Diff line number Diff line change
@@ -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
6 changes: 5 additions & 1 deletion packages/web-runtime/src/pages/resolvePrivateLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down Expand Up @@ -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
Expand Down