Skip to content

Commit

Permalink
fix(ember): convert abilities to getters
Browse files Browse the repository at this point in the history
  • Loading branch information
Yelinz committed Jan 8, 2024
1 parent f5c4e66 commit 857a593
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
6 changes: 3 additions & 3 deletions ember/app/abilities/additional-email.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ export default class AdditionalEmailAbility extends BaseAbility {
return this.isStaff;
}

canAdd() {
get canAdd() {
return this.canEditIdentity(this.model);
}

canEdit() {
get canEdit() {
return this.canEditIdentity(this.model);
}

canDelete() {
get canDelete() {
return this.canEditIdentity(this.model);
}
}
7 changes: 4 additions & 3 deletions ember/app/abilities/phone-number.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@ export default class PhoneNumberAbility extends BaseAbility {
get showMultiLangDescription() {
return this.isStaff;
}
canAdd() {

get canAdd() {
return this.canEditIdentity(this.model);
}

canEdit() {
get canEdit() {
return this.canEditIdentity(this.model);
}

canDelete() {
get canDelete() {
return this.canEditIdentity(this.model);
}
}

0 comments on commit 857a593

Please sign in to comment.