Vulcan/packages/vulcan-comments/lib/permissions.js

24 lines
499 B
JavaScript
Raw Normal View History

2017-03-23 16:27:59 +09:00
import Users from 'meteor/vulcan:users';
2016-07-19 17:30:59 +09:00
const guestsActions = [
"comments.view"
2016-07-19 17:30:59 +09:00
];
Users.groups.guests.can(guestsActions);
2016-07-19 17:30:59 +09:00
const membersActions = [
"comments.view",
2016-07-19 17:30:59 +09:00
"comments.new",
"comments.edit.own",
"comments.remove.own",
"comments.upvote",
"comments.cancelUpvote",
"comments.downvote",
"comments.cancelDownvote"
];
Users.groups.members.can(membersActions);
2016-07-19 17:30:59 +09:00
const adminActions = [
"comments.edit.all",
"comments.remove.all"
];
Users.groups.admins.can(adminActions);