后台:修改权限用表
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import { GMUserModel } from '@db/GMUser';
|
||||
import { GMUserGroupModel } from '@db/GMUserGroup'
|
||||
import { GMGroupModel } from '@db/GMGroup'
|
||||
import { GMRecordModel } from '@db/GMRecord'
|
||||
import { GM_API_TYPE, STATUS } from '@consts';
|
||||
@@ -25,14 +24,9 @@ module.exports = () => {
|
||||
ctx.body = ctx.service.utils.resResult(STATUS.GM_MISS_API);
|
||||
return;
|
||||
}
|
||||
let userGroup = await GMUserGroupModel.getUserGroupByUid(user.uid);
|
||||
if(!userGroup) {
|
||||
ctx.body = ctx.service.utils.resResult(STATUS.GM_NO_AUTHORITY_GET);
|
||||
return
|
||||
}
|
||||
let group = await GMGroupModel.getGroupById(userGroup.groupId);
|
||||
let group = await GMGroupModel.getGroupById(user.groupId);
|
||||
|
||||
if(!group) {
|
||||
if(!group || !user.isEnable) {
|
||||
ctx.body = ctx.service.utils.resResult(STATUS.GM_NO_AUTHORITY_GET);
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user