用户管理
This commit is contained in:
parent
50dbaf00d1
commit
5c1a0c498a
|
|
@ -105,7 +105,7 @@ public class SysRoleController extends BaseController
|
|||
@PutMapping
|
||||
public AjaxResult edit(@Validated @RequestBody SysRole role)
|
||||
{
|
||||
// roleService.checkRoleAllowed(role);
|
||||
roleService.checkRoleAllowed(role);
|
||||
roleService.checkRoleDataScope(role.getRoleId());
|
||||
if (!roleService.checkRoleNameUnique(role))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -182,7 +182,8 @@ public class SysUserController extends BaseController
|
|||
userService.checkUserDataScope(userId);
|
||||
AjaxResult ajax = AjaxResult.success();
|
||||
List<SysRole> roles = roleService.selectRoleAll();
|
||||
ajax.put("roles", SysUser.isAdmin(userId) ? roles : roles.stream().filter(r -> !r.isAdmin()).collect(Collectors.toList()));
|
||||
ajax.put("roles", roles);
|
||||
// ajax.put("roles", SysUser.isAdmin(userId) ? roles : roles.stream().filter(r -> !r.isAdmin()).collect(Collectors.toList()));
|
||||
ajax.put("posts", postService.selectPostAll());
|
||||
if (StringUtils.isNotNull(userId))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -65,8 +65,8 @@ public class SysMenuServiceImpl implements ISysMenuService
|
|||
@Override
|
||||
public List<SysMenu> selectMenuList(SysMenu menu, Long userId)
|
||||
{
|
||||
List<SysMenu> menuList = null;
|
||||
// 管理员显示所有菜单信息
|
||||
List<SysMenu> menuList = menuMapper.selectMenuList(menu);
|
||||
/*// 管理员显示所有菜单信息
|
||||
if (SysUser.isAdmin(userId))
|
||||
{
|
||||
menuList = menuMapper.selectMenuList(menu);
|
||||
|
|
@ -75,7 +75,7 @@ public class SysMenuServiceImpl implements ISysMenuService
|
|||
{
|
||||
menu.getParams().put("userId", userId);
|
||||
menuList = menuMapper.selectMenuListByUserId(menu);
|
||||
}
|
||||
}*/
|
||||
return menuList;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -224,10 +224,10 @@ public class SysUserServiceImpl implements ISysUserService
|
|||
@Override
|
||||
public void checkUserAllowed(SysUser user)
|
||||
{
|
||||
if (StringUtils.isNotNull(user.getUserId()) && user.isAdmin())
|
||||
/*if (StringUtils.isNotNull(user.getUserId()) && user.isAdmin())
|
||||
{
|
||||
throw new ServiceException("不允许操作超级管理员用户");
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue