...
|
...
|
@@ -165,14 +165,14 @@ func (controller *BaseController) ValidAdminPermission(permissionCode string, ex |
|
|
controller.ResponseError(errors.New("无操作权限"))
|
|
|
return false
|
|
|
}
|
|
|
if !adminuser.IsUsable {
|
|
|
controller.ResponseError(errors.New("用户被禁用"))
|
|
|
return false
|
|
|
}
|
|
|
if adminuser.IsDefault {
|
|
|
logs.Debug("用户是超级管理员")
|
|
|
return true
|
|
|
}
|
|
|
if !adminuser.IsUsable {
|
|
|
controller.ResponseError(errors.New("用户被禁用"))
|
|
|
return false
|
|
|
}
|
|
|
for _, v := range adminuser.Permission {
|
|
|
if v.Code == permissionCode {
|
|
|
return true
|
...
|
...
|
|