Skip to content
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: 4 additions & 2 deletions packages/web-pkg/src/services/folder/loaders/loaderSpace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,10 @@ export class FolderLoaderSpace implements FolderLoader {
driveItem: sharedDriveItem,
serverUrl: configStore.serverUrl
}),
// graph doesn't expose the webdav permissions of the share root
permissions: currentFolder.permissions
// graph doesn't expose the webdav permissions, favorite state and tags of the share root
permissions: currentFolder.permissions,
starred: currentFolder.starred,
tags: currentFolder.tags
}
}
} else if (!isPersonalSpaceResource(space) && !isPublicSpaceResource(space)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ describe('FolderLoaderSpace', () => {
})
})

it('keeps the webdav permissions on the share root', async () => {
it('keeps the webdav permissions, favorite state and tags on the share root', async () => {
vi.mocked(getSharedDriveItem).mockResolvedValueOnce({
id: 'mount-id',
name: 'f1',
Expand All @@ -93,13 +93,25 @@ describe('FolderLoaderSpace', () => {
graphPermissions: [],
getDriveAliasAndItem: () => 'share/f1'
} as unknown as SpaceResource
const root = { id: 'share-space-id', path: '/', isFolder: true, permissions: 'SNVCK' }
const root = {
id: 'share-space-id',
path: '/',
isFolder: true,
permissions: 'SNVCK',
starred: true,
tags: ['important']
}

const { resourcesStore } = await loadFolder({ space, path: '/', resource: root as Resource })

expect(resourcesStore.initResourceList).toHaveBeenCalledWith(
expect.objectContaining({
currentFolder: expect.objectContaining({ id: 'mount-id', permissions: 'SNVCK' })
currentFolder: expect.objectContaining({
id: 'mount-id',
permissions: 'SNVCK',
starred: true,
tags: ['important']
})
})
)
})
Expand Down
Loading