diff --git a/packages/web-app-files/src/components/SideBar/Shares/Collaborators/InviteCollaborator/AutocompleteItem.vue b/packages/web-app-files/src/components/SideBar/Shares/Collaborators/InviteCollaborator/AutocompleteItem.vue index 658b1a7a6b4..a9a83f23748 100644 --- a/packages/web-app-files/src/components/SideBar/Shares/Collaborators/InviteCollaborator/AutocompleteItem.vue +++ b/packages/web-app-files/src/components/SideBar/Shares/Collaborators/InviteCollaborator/AutocompleteItem.vue @@ -11,6 +11,13 @@ :userid="item.value.shareWith" :user-name="item.label" /> + user.value.shareWith !== this.user.id) .map((result) => { - // Inject the correct share type here as the response has always type "user" - return { ...result, value: { ...result.value, shareType } } + // Inject the correct share type here if space + const shareType = this.resourceIsSpace ? ShareTypes.space.value : result.value.shareType + return { + ...result, + value: { + ...result.value, + shareType + } + } }) let groups = [] diff --git a/packages/web-app-files/src/components/SideBar/Shares/Collaborators/ListItem.vue b/packages/web-app-files/src/components/SideBar/Shares/Collaborators/ListItem.vue index 6baae92a895..880ba461b0e 100644 --- a/packages/web-app-files/src/components/SideBar/Shares/Collaborators/ListItem.vue +++ b/packages/web-app-files/src/components/SideBar/Shares/Collaborators/ListItem.vue @@ -13,6 +13,12 @@ :width="48" class="files-collaborators-collaborator-indicator" /> + r.shareInfo) if (resources.length) { const configuration = store.getters.configuration diff --git a/packages/web-app-files/src/services/folder/loaderSharedWithMe.ts b/packages/web-app-files/src/services/folder/loaderSharedWithMe.ts index 9c735473701..42d051169fc 100644 --- a/packages/web-app-files/src/services/folder/loaderSharedWithMe.ts +++ b/packages/web-app-files/src/services/folder/loaderSharedWithMe.ts @@ -23,14 +23,13 @@ export class FolderLoaderSharedWithMe implements FolderLoader { return useTask(function* (signal1, signal2) { store.commit('Files/CLEAR_CURRENT_FILES_LIST') - let resources = yield client.requests.ocs({ - service: 'apps/files_sharing', - action: '/api/v1/shares?format=json&shared_with_me=true&state=all&include_tags=false', - method: 'GET' + let resources = yield client.shares.getShares('', { + state: 'all', + include_tags: false, + shared_with_me: true }) - resources = yield resources.json() - resources = resources.ocs.data + resources = resources.map((r) => r.shareInfo) if (resources.length) { const configuration = store.getters.configuration diff --git a/packages/web-app-files/src/services/folder/loaderSharedWithOthers.ts b/packages/web-app-files/src/services/folder/loaderSharedWithOthers.ts index c2d9d6af39f..9b98067053f 100644 --- a/packages/web-app-files/src/services/folder/loaderSharedWithOthers.ts +++ b/packages/web-app-files/src/services/folder/loaderSharedWithOthers.ts @@ -29,14 +29,13 @@ export class FolderLoaderSharedWithOthers implements FolderLoader { .map((share) => share.value) .join(',') - let resources = yield client.requests.ocs({ - service: 'apps/files_sharing', - action: `/api/v1/shares?format=json&reshares=true&include_tags=false&share_types=${shareTypes}`, - method: 'GET' + let resources = yield client.shares.getShares('', { + share_types: shareTypes, + reshares: true, + include_tags: false }) - resources = yield resources.json() - resources = resources.ocs.data + resources = resources.map((r) => r.shareInfo) if (resources.length) { const configuration = store.getters.configuration @@ -51,6 +50,9 @@ export class FolderLoaderSharedWithOthers implements FolderLoader { ) } + const user = store.state.user + resources = resources.filter((r) => r.shareOwner === user.id) + store.commit('Files/LOAD_FILES', { currentFolder: null, files: resources }) }) } diff --git a/packages/web-runtime/package.json b/packages/web-runtime/package.json index aea45c9b2d8..267b99110ab 100644 --- a/packages/web-runtime/package.json +++ b/packages/web-runtime/package.json @@ -19,7 +19,7 @@ "marked": "^4.0.12", "oidc-client": "1.11.5", "owncloud-design-system": "^13.1.0-rc.5", - "owncloud-sdk": "~3.0.0-alpha.4", + "owncloud-sdk": "~3.0.0-alpha.6", "p-queue": "^6.1.1", "popper-max-size-modifier": "^0.2.0", "portal-vue": "^2.1.7", diff --git a/yarn.lock b/yarn.lock index 9757efe6c8f..20f78b08b56 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9694,9 +9694,9 @@ __metadata: languageName: node linkType: hard -"owncloud-sdk@npm:~3.0.0-alpha.4": - version: 3.0.0-alpha.4 - resolution: "owncloud-sdk@npm:3.0.0-alpha.4" +"owncloud-sdk@npm:~3.0.0-alpha.6": + version: 3.0.0-alpha.6 + resolution: "owncloud-sdk@npm:3.0.0-alpha.6" peerDependencies: axios: ^0.26.0 cross-fetch: ^3.0.6 @@ -9704,9 +9704,9 @@ __metadata: qs: ^6.10.3 utf8: ^3.0.0 uuid: ^8.2.0 - webdav: 4.8.0 + webdav: 4.9.0 xml-js: ^1.6.11 - checksum: de15ec2b3f5ed097eb73777192220f3e5df637d3aa2266d964c30d9fce904252ee9269f516e294fae8e8b41334508ef8e0212bda299c608d13a4e234536f9e27 + checksum: 4f5d5e92f108ed2e1fa1145396cb29d2d6ff48737edb8de8e655e77d9960acccb1e5136451f681d9c731a95f94e37fd1b3abb0202d61e6724104bdece3052151 languageName: node linkType: hard @@ -13822,7 +13822,7 @@ __metadata: marked: ^4.0.12 oidc-client: 1.11.5 owncloud-design-system: ^13.1.0-rc.5 - owncloud-sdk: ~3.0.0-alpha.4 + owncloud-sdk: ~3.0.0-alpha.6 p-queue: ^6.1.1 popper-max-size-modifier: ^0.2.0 portal-vue: ^2.1.7