This commit is contained in:
2021-07-14 23:59:17 +00:00
parent 019e6fcf01
commit 029ce45b91
2 changed files with 17 additions and 8 deletions

View File

@@ -774,10 +774,18 @@ export default {
return this.pvm.rights.change && this.pvm.subRights.expenses.create;
},
canDelete: function() {
return this.activeItemIndex != null && this.canDeleteAll;
return (
this.activeItemIndex != null &&
this.pvm.rights.change &&
this.pvm.subRights.expenses.delete
);
},
canDeleteAll: function() {
return this.pvm.rights.change && this.pvm.subRights.expenses.delete;
return (
this.pvm.rights.change &&
this.pvm.subRights.expenses.delete &&
!this.value.userIsRestrictedType
);
}
}
};