From fbd7e62f2125baad560e1f304985c27aeb472b65 Mon Sep 17 00:00:00 2001 From: Kamil Kisiela Date: Thu, 7 Apr 2016 20:12:56 +0200 Subject: [PATCH] Step 15.6: Add isOwner method --- imports/ui/components/partiesList/partiesList.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/imports/ui/components/partiesList/partiesList.js b/imports/ui/components/partiesList/partiesList.js index fcf7bbf49..58dd939f0 100644 --- a/imports/ui/components/partiesList/partiesList.js +++ b/imports/ui/components/partiesList/partiesList.js @@ -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; }