mirror of
https://github.com/wassname/talk.git
synced 2026-08-17 11:27:52 +08:00
update backend with the can() method
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user