Browse Source

opt:按钮权限

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

5
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) { public List<String> getPermissionList(JSONObject userDto) {
List<String> permission = new LinkedList<>(); List<String> permission = new LinkedList<>();
// 查看是否为管理员 // 查看是否为管理员
String username = userDto.getString("username");
if("admin".equals(username)){
permission.add("admin"); permission.add("admin");
permission.addAll(sysMenuMapper.getPermissionByUserId(userDto.getString("userId"))); }
permission.addAll(sysMenuMapper.getPermissionByUserId(userDto.getString("user_id")));
return permission; return permission;
} }

Loading…
Cancel
Save