From b64f66c25336fc8b8d447188feb56b8ce2791d3b Mon Sep 17 00:00:00 2001 From: mcdamo Date: Mon, 3 May 2021 22:28:34 +1000 Subject: [PATCH] Remove permission check in GalleryMW --- src/backend/middlewares/GalleryMWs.ts | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/backend/middlewares/GalleryMWs.ts b/src/backend/middlewares/GalleryMWs.ts index 713878ee..20c162ed 100644 --- a/src/backend/middlewares/GalleryMWs.ts +++ b/src/backend/middlewares/GalleryMWs.ts @@ -81,12 +81,6 @@ export class GalleryMWs { req.resultPipe = new ContentWrapper(null, null, true); return next(); } - if (req.session.user.permissions && - req.session.user.permissions.length > 0 && - req.session.user.permissions[0] !== '/*') { - (directory as DirectoryDTO).directories = (directory as DirectoryDTO).directories.filter((d): boolean => - UserDTOUtils.isDirectoryAvailable(d, req.session.user.permissions)); - } res.set('Content-Type', 'application/zip'); res.set('Content-Disposition', 'attachment; filename=Gallery.zip');