用户角色设置
This commit is contained in:
@@ -158,7 +158,6 @@ func UpdateUserRole(ctx *jxcontext.Context, userIDs []string, roleIDs []int) (er
|
|||||||
for _, v := range userRoles {
|
for _, v := range userRoles {
|
||||||
userRoleMap[v.UserID] = append(userRoleMap[v.UserID], v.RoleID)
|
userRoleMap[v.UserID] = append(userRoleMap[v.UserID], v.RoleID)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
for _, userID := range userIDs {
|
for _, userID := range userIDs {
|
||||||
nowRoleIDs := userRoleMap[userID]
|
nowRoleIDs := userRoleMap[userID]
|
||||||
for _, nowRoleID := range nowRoleIDs {
|
for _, nowRoleID := range nowRoleIDs {
|
||||||
@@ -205,5 +204,6 @@ func UpdateUserRole(ctx *jxcontext.Context, userIDs []string, roleIDs []int) (er
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
dao.Commit(db)
|
dao.Commit(db)
|
||||||
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user