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

[full-ci] Fix wrong space ref #7247

Merged
merged 7 commits into from
Jul 8, 2022
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
1 change: 1 addition & 0 deletions changelog/unreleased/enhancement-ocis-resharing
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ We've enhanced web to be able to re-share resources when using an ownCloud infin
Besides that we also send roles, space-ref and path as separate values to the sharing api which simplifies the usage of it.

https://github.com/owncloud/web/pull/7086
https://github.com/owncloud/web/pull/7247
https://github.com/owncloud/web/issues/6894
https://github.com/owncloud/web/pull/7243
https://github.com/owncloud/web/issues/7225
8 changes: 3 additions & 5 deletions packages/web-app-files/src/helpers/share/link.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const createQuicklink = async (args: CreateQuicklink): Promise<Share> =>
params.password = args.password
}

const { storageId, resource, store } = args
const { resource, store } = args
const expirationDate = store.state.user.capabilities.files_sharing.public.expire_date

if (expirationDate.enforced) {
Expand All @@ -39,15 +39,13 @@ export const createQuicklink = async (args: CreateQuicklink): Promise<Share> =>
// needs check for enforced password for default role (viewer?)
// and concept to what happens if it is enforced

if (storageId) {
params.spaceRef = `${storageId}${resource.path}`
}
params.spaceRef = resource.fileId || resource.id

const link = await store.dispatch('Files/addLink', {
path: resource.path,
client: clientService.owncloudSdk,
params,
storageId
storageId: resource.fileId || resource.id
})

copyToClipboard(link.url)
Expand Down