Would be possible to change the property to check if the fields must be disabled or not in partyDetails.html.
The tutorial is checking if an user is logged but always we are on that view, we have an user logged, because Meteor won't allow to reach this view unless the user is logged.
Moreover, be logged isn't the unique requirement to update a party, you also need to be the owner and that's why I propose check if the logged user is the owner of the party to know when disabled the fields and also the "save" button.
What I did is ng-disabled="!partyDetails.isOwner"
and create the helper:
isOwner() {
let party = this.getReactively('party')
if (!party)
return false;
return Meteor.userId() === party.owner;
}
Would be possible to change the property to check if the fields must be disabled or not in partyDetails.html. The tutorial is checking if an user is logged but always we are on that view, we have an user logged, because Meteor won't allow to reach this view unless the user is logged. Moreover, be logged isn't the unique requirement to update a party, you also need to be the owner and that's why I propose check if the logged user is the owner of the party to know when disabled the fields and also the "save" button.
What I did is
ng-disabled="!partyDetails.isOwner"
and create the helper:What do you think, could be this an improvement?