Export Wekan now server-based with proper auth

This commit is contained in:
Xavier Priour 2015-12-16 21:54:35 +01:00
parent efe7c21d57
commit d08e1cc45b
6 changed files with 42 additions and 26 deletions

View file

@ -80,15 +80,15 @@ Boards.attachSchema(new SimpleSchema({
Boards.helpers({
/**
* Is current logged-in user authorized to view this board?
* Is supplied user authorized to view this board?
*/
isVisibleByUser() {
isVisibleBy(user) {
if(this.isPublic()) {
// public boards are visible to everyone
return true;
} else {
// otherwise you have to be logged-in and active member
return this.isActiveMember(Meteor.userId());
return this.isActiveMember(user._id);
}
},