...
|
...
|
@@ -364,7 +364,7 @@ func (userService *UserService) GetUserAccessMenus(getUserAccessMenusQuery *quer |
|
|
"transactionContext": transactionContext,
|
|
|
})
|
|
|
|
|
|
menus, err := roleAccessMenusService.AccessMenus(nil, user.UserOrgIds(), domain.AccessMenusOptions{
|
|
|
menus, err := roleAccessMenusService.AccessMenus(nil, user.UserRoleIds(), domain.AccessMenusOptions{
|
|
|
CompanyId: user.CompanyId,
|
|
|
MenuCategory: getUserAccessMenusQuery.MenuCategory,
|
|
|
OrgId: getUserAccessMenusQuery.OrgId,
|
...
|
...
|
@@ -626,8 +626,16 @@ func (userService *UserService) UpdateUser(updateUserCommand *command.UpdateUser |
|
|
}
|
|
|
user.DepartmentId = updateUserCommand.DepartmentId
|
|
|
user.OrganizationId = updateUserCommand.OrganizationId
|
|
|
user.UserOrg = updateUserCommand.UserOrg
|
|
|
user.UserRole = updateUserCommand.UserRole
|
|
|
var userOrg = make([]*domain.Org, 0)
|
|
|
for i := range updateUserCommand.UserOrg {
|
|
|
userOrg = append(userOrg, &domain.Org{OrgId: updateUserCommand.UserOrg[i]})
|
|
|
}
|
|
|
user.UserOrg = userOrg
|
|
|
var userRole = make([]*domain.Role, 0)
|
|
|
for i := range updateUserCommand.UserRole {
|
|
|
userRole = append(userRole, &domain.Role{RoleId: updateUserCommand.UserRole[i]})
|
|
|
}
|
|
|
user.UserRole = userRole
|
|
|
|
|
|
userInfo := &domain.UserInfo{
|
|
|
UserName: updateUserCommand.UserName,
|
...
|
...
|
|