Browse Source

opt:按钮权限

master
zds 3 months ago
parent
commit
81297d134f
  1. 7
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/role/impl/SysRoleServiceImpl.java

7
lms/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/role/impl/SysRoleServiceImpl.java

@ -130,8 +130,11 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
public List<String> getPermissionList(JSONObject userDto) {
List<String> permission = new LinkedList<>();
// 查看是否为管理员
permission.add("admin");
permission.addAll(sysMenuMapper.getPermissionByUserId(userDto.getString("userId")));
String username = userDto.getString("username");
if("admin".equals(username)){
permission.add("admin");
}
permission.addAll(sysMenuMapper.getPermissionByUserId(userDto.getString("user_id")));
return permission;
}

Loading…
Cancel
Save