Skip to content

Commit

Permalink
Step 15.6: Add isOwner method
Browse files Browse the repository at this point in the history
  • Loading branch information
Kamil Kisiela authored and DAB0mB committed Dec 14, 2016
1 parent d1709e1 commit fbd7e62
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions imports/ui/components/partiesList/partiesList.js
Expand Up @@ -48,10 +48,17 @@ class PartiesList {
},
isLoggedIn() {
return !!Meteor.userId();
},
currentUserId() {
return Meteor.userId();
}
});
}

isOwner(party) {
return this.isLoggedIn && party.owner === this.currentUserId;
}

pageChanged(newPage) {
this.page = newPage;
}
Expand Down

0 comments on commit fbd7e62

Please sign in to comment.