RED-1735: Deleting a dossier should be possible only for the Owner

This commit is contained in:
Adina Țeudan 2021-06-30 23:19:04 +03:00
parent 468b2d8a72
commit b8ea3e86b4

View File

@ -186,7 +186,7 @@ export class PermissionsService {
}
canDeleteDossier(dossier = this._activeDossier): boolean {
return dossier?.files.reduce((acc, file) => acc && this.canDeleteFile(file, dossier), true);
return dossier.ownerId === this.currentUser.userId;
}
isAdmin(user = this.currentUser): boolean {