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