Merge pull request #3639 from mehmetuken/delete-files

Files delete permission check first and after delete files.
This commit is contained in:
Rijk van Zanten
2021-01-11 07:43:20 -07:00
committed by GitHub

View File

@@ -104,6 +104,8 @@ export class FilesService extends ItemsService {
throw new ForbiddenException();
}
await super.delete(keys);
files = toArray(files);
for (const file of files) {
@@ -115,8 +117,6 @@ export class FilesService extends ItemsService {
}
}
await super.delete(keys);
if (cache && env.CACHE_AUTO_PURGE) {
await cache.clear();
}