ML: Take permissions into account before fetching a single folder

This commit is contained in:
Gustav Hansen 2022-06-15 13:34:18 +02:00
parent 5659b5f031
commit fc7865f8ee

View File

@ -89,7 +89,7 @@ export const MediaLibrary = () => {
isLoading: isCurrentFolderLoading,
error: currentFolderError,
} = useFolder(query?.folder, {
enabled: !!query?.folder,
enabled: canRead && !!query?.folder,
});
// Folder was not found: redirect to the media library root