+ GetRolesUserList
This commit is contained in:
@@ -380,6 +380,19 @@ func GetRoleUserList(ctx *jxcontext.Context, r *authz.RoleInfo) (userIDList []st
|
||||
return api2.RoleMan.GetRoleUserList(r)
|
||||
}
|
||||
|
||||
func GetRolesUserList(ctx *jxcontext.Context, rList []*authz.RoleInfo) (userIDMap map[string][]string, err error) {
|
||||
userIDMap = make(map[string][]string)
|
||||
for _, r := range rList {
|
||||
userIDList, err2 := api2.RoleMan.GetRoleUserList(r)
|
||||
if err = err2; err == nil {
|
||||
userIDMap[r.GetFullName()] = userIDList
|
||||
} else {
|
||||
break
|
||||
}
|
||||
}
|
||||
return userIDMap, err
|
||||
}
|
||||
|
||||
func checkUserType(userID string, userType int8) (err error) {
|
||||
userList, _, err := dao.GetUsers(dao.GetDB(), 0, "", []string{userID}, "", "", 0, 0)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user