mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
Delete item first and check permission.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user