RED-2787
This commit is contained in:
parent
e4a9d87b99
commit
11e7090dc7
@ -30,9 +30,15 @@ export class PermissionsService {
|
||||
return file.assignee === this._userService.currentUser.id;
|
||||
}
|
||||
|
||||
// https://jira.iqser.com/browse/RED-2787
|
||||
canDeleteFile(file: File): boolean {
|
||||
const dossier = this._getDossier(file);
|
||||
return (this.isOwner(dossier) && !file.isApproved) || file.isNew;
|
||||
return (
|
||||
file.isNew ||
|
||||
(file.isUnderReview && !file.assignee && this.isDossierMember(dossier)) ||
|
||||
(file.isUnderApproval && !file.assignee && this.isApprover(dossier)) ||
|
||||
(file.assignee && !file.isApproved && (this.isFileAssignee(file) || this.isOwner(dossier)))
|
||||
);
|
||||
}
|
||||
|
||||
canAssignToSelf(file: File, dossier = this._getDossier(file)): boolean {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user