2017-09-04 18:37:21 +09:00
|
|
|
/*
|
|
|
|
|
|
|
|
Posts permissions
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
import Users from 'meteor/vulcan:users';
|
|
|
|
|
|
|
|
const guestsActions = [
|
|
|
|
'posts.view.approved'
|
|
|
|
];
|
|
|
|
Users.groups.guests.can(guestsActions);
|
|
|
|
|
|
|
|
const membersActions = [
|
|
|
|
'posts.new',
|
|
|
|
'posts.edit.own',
|
|
|
|
'posts.remove.own',
|
2017-09-29 07:40:41 +09:00
|
|
|
'posts.upvote',
|
|
|
|
'posts.downvote',
|
2017-09-04 18:37:21 +09:00
|
|
|
];
|
|
|
|
Users.groups.members.can(membersActions);
|
|
|
|
|
|
|
|
const adminActions = [
|
|
|
|
'posts.view.pending',
|
|
|
|
'posts.view.rejected',
|
|
|
|
'posts.view.spam',
|
|
|
|
'posts.view.deleted',
|
|
|
|
'posts.new.approved',
|
|
|
|
'posts.edit.all',
|
|
|
|
'posts.remove.all'
|
|
|
|
];
|
2017-09-29 07:40:41 +09:00
|
|
|
Users.groups.admins.can(adminActions);
|