RED-1735: Deleting a dossier should be possible only for the Owner
This commit is contained in:
parent
468b2d8a72
commit
b8ea3e86b4
@ -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 {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user