Skip to content

Commit

Permalink
cs
Browse files Browse the repository at this point in the history
  • Loading branch information
laoneo committed Feb 3, 2022
1 parent 303ed37 commit c576dc7
Showing 1 changed file with 5 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,21 +133,15 @@ export default {
};
},
computed: {
canEdit() {
if (typeof this.item.canEdit !== 'undefined') {
return this.item.canEdit;
}
return api.canEdit;
canEdit() {
return api.canEdit && (typeof this.item.canEdit !== 'undefined' ? this.item.canEdit : true);
},
canDelete() {
return api.canEdit && (typeof this.item.canDelete !== 'undefined' ? this.item.canDelete : true);
},
canOpenEditView() {
return ['jpg', 'jpeg', 'png'].includes(this.item.extension.toLowerCase());
},
canDelete() {
if (typeof this.item.canDelete !== 'undefined') {
return this.item.canDelete;
}
return api.canDelete;
},
},
watch: {
// eslint-disable-next-line
Expand Down

0 comments on commit c576dc7

Please sign in to comment.