1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2024-11-03 21:04:03 +08:00

Remove permission check in GalleryMW

This commit is contained in:
mcdamo 2021-05-03 22:28:34 +10:00
parent 3425fba1e5
commit b64f66c253

View File

@ -81,12 +81,6 @@ export class GalleryMWs {
req.resultPipe = new ContentWrapper(null, null, true); req.resultPipe = new ContentWrapper(null, null, true);
return next(); 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-Type', 'application/zip');
res.set('Content-Disposition', 'attachment; filename=Gallery.zip'); res.set('Content-Disposition', 'attachment; filename=Gallery.zip');