用户操作权限增加角色权限过滤,优化角色/部门关系树生成,修复验证码空参数不验证问题

This commit is contained in:
孟帅
2023-08-02 17:38:40 +08:00
parent e941e52d3e
commit 3df5236623
28 changed files with 1097 additions and 887 deletions

View File

@@ -8,6 +8,7 @@ package admin
import (
"context"
"hotgo/api/admin/role"
"hotgo/internal/consts"
"hotgo/internal/library/contexts"
"hotgo/internal/service"
)
@@ -69,7 +70,7 @@ func (c *cRole) UpdatePermissions(ctx context.Context, req *role.UpdatePermissio
// DataScopeSelect 获取数据权限选项
func (c *cRole) DataScopeSelect(_ context.Context, _ *role.DataScopeSelectReq) (res *role.DataScopeSelectRes, err error) {
res = new(role.DataScopeSelectRes)
res.List = service.AdminRole().DataScopeSelect()
res.List = consts.DataScopeSelect //service.AdminRole().DataScopeSelect()
return
}