mirror of
https://github.com/immich-app/immich.git
synced 2025-01-19 18:26:46 +01:00
feat(server): require ASSET_DOWNLOAD premission for fullsize previews
This commit is contained in:
parent
97b1261095
commit
87ce9db8fa
1 changed files with 1 additions and 0 deletions
|
@ -213,6 +213,7 @@ export class AssetMediaService extends BaseService {
|
|||
if (size === AssetMediaSize.THUMBNAIL && thumbnailFile) {
|
||||
filepath = thumbnailFile.path;
|
||||
} else if (size === AssetMediaSize.FULLSIZE) {
|
||||
await this.requireAccess({ auth, permission: Permission.ASSET_DOWNLOAD, ids: [id] });
|
||||
// eslint-disable-next-line unicorn/prefer-ternary
|
||||
if (mimeTypes.isWebSupportedImage(asset.originalPath)) {
|
||||
filepath = asset.originalPath;
|
||||
|
|
Loading…
Reference in a new issue