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

26 lines
551 B
JavaScript
Raw Normal View History

2016-07-19 17:30:59 +09:00
import Users from 'meteor/nova:users';
const guestsActions = [
2016-07-20 10:25:05 +09:00
"comments.view.own",
"comments.view.all"
2016-07-19 17:30:59 +09:00
];
Users.groups.guests.can(guestsActions);
2016-07-19 17:30:59 +09:00
const membersActions = [
2016-07-20 10:25:05 +09:00
"comments.view.own",
"comments.view.all",
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);