Vulcan/packages/example-forum/lib/modules/comments/permissions.js

30 lines
529 B
JavaScript
Raw Normal View History

2017-09-04 18:37:21 +09:00
/*
Comments permissions
*/
import Users from 'meteor/vulcan:users';
const guestsActions = [
'comments.view'
];
Users.groups.guests.can(guestsActions);
const membersActions = [
'comments.view',
'comments.new',
'comments.edit.own',
'comments.remove.own',
'comments.upvote',
'comments.cancelUpvote',
'comments.downvote',
'comments.cancelDownvote'
];
Users.groups.members.can(membersActions);
const adminActions = [
'comments.edit.all',
'comments.remove.all'
];
Users.groups.admins.can(adminActions);