diff --git a/changelog/unreleased/bugfix-sharing-label-for-locked-files b/changelog/unreleased/bugfix-sharing-label-for-locked-files new file mode 100644 index 00000000000..441e5ef3c77 --- /dev/null +++ b/changelog/unreleased/bugfix-sharing-label-for-locked-files @@ -0,0 +1,5 @@ +Bugfix: Sharing label for locked files + +We've fixed a bug where a locked file would be falsely labelled as shared in the right sidebar. + +https://github.com/owncloud/web/pull/11795 diff --git a/packages/web-app-files/src/components/SideBar/Details/FileDetails.vue b/packages/web-app-files/src/components/SideBar/Details/FileDetails.vue index 1a8380605af..7e3b89c0d3d 100644 --- a/packages/web-app-files/src/components/SideBar/Details/FileDetails.vue +++ b/packages/web-app-files/src/components/SideBar/Details/FileDetails.vue @@ -260,7 +260,7 @@ export default defineComponent({ resource: unref(resource), ancestorMetaData: unref(ancestorMetaData), user: unref(user) - }) + }).filter(({ category }) => category === 'sharing') }) const hasAnyShares = computed(() => { diff --git a/packages/web-app-files/tests/unit/components/SideBar/Details/FileDetails.spec.ts b/packages/web-app-files/tests/unit/components/SideBar/Details/FileDetails.spec.ts index 9f56ae13fbc..6131441c8c7 100644 --- a/packages/web-app-files/tests/unit/components/SideBar/Details/FileDetails.spec.ts +++ b/packages/web-app-files/tests/unit/components/SideBar/Details/FileDetails.spec.ts @@ -222,7 +222,7 @@ function createWrapper({ ...mocks, versions, resource, - space: mockDeep() + space: mockDeep({ driveType: 'personal', isOwner: () => true }) }, plugins: [ ...defaultPlugins({