update backend with the can() method

This commit is contained in:
riley
2017-05-16 10:50:09 -06:00
parent 62e8e4c5c5
commit c7e9fe3f5f
10 changed files with 34 additions and 122 deletions
+2 -2
View File
@@ -31,11 +31,11 @@ module.exports = (context) => {
}
};
if (context.user && context.user.can('mutation:setUserStatus')) {
if (context.user && context.user.can('SET_USER_STATUS')) {
mutators.User.setUserStatus = (action) => setUserStatus(context, action);
}
if (context.user && context.user.can('mutation:suspendUser')) {
if (context.user && context.user.can('SUSPEND_USER')) {
mutators.User.suspendUser = (action) => suspendUser(context, action);
}