Skip to content

Commit

Permalink
Step 15.12: Add isOwner helper to the party details component
Browse files Browse the repository at this point in the history
  • Loading branch information
Kamil Kisiela authored and Dotan Simha committed Nov 22, 2016
1 parent a5b954c commit 4583894
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions imports/ui/components/partyDetails/partyDetails.js
Expand Up @@ -27,6 +27,16 @@ class PartyDetails {
},
users() {
return Meteor.users.find({});
},
isLoggedIn() {
return !!Meteor.userId();
},
isOwner() {
if (!this.party) {
return false;
}

return this.party.owner === Meteor.userId();
}
});
}
Expand Down

0 comments on commit 4583894

Please sign in to comment.