修改权限

This commit is contained in:
lcj
2025-09-30 09:37:25 +08:00
parent a1450c4796
commit cdd9266452

View File

@ -28,7 +28,7 @@ public class SaPermissionImpl implements StpInterface {
public List<String> getPermissionList(Object loginId, String loginType) {
LoginUser loginUser = LoginHelper.getLoginUser();
UserType userType = UserType.getUserType(loginUser.getUserType());
if (userType == UserType.SYS_USER) {
if (userType == UserType.SYS_USER || userType == UserType.APP_USER) {
Long projectId = loginUser.getProjectId();
List<SysProjectRoleMenuVo> menuPermission = loginUser.getMenuPermission();
if (CollUtil.isNotEmpty(menuPermission)) {
@ -51,9 +51,10 @@ public class SaPermissionImpl implements StpInterface {
return new ArrayList<>();
}
} else if (userType == UserType.APP_USER) {
// 其他端 自行根据业务编写
}
/* else if (userType == UserType.APP_USER) {
// 其他端 自行根据业务编写
}*/
return new ArrayList<>();
// return Collections.singletonList("*");
}
@ -65,7 +66,7 @@ public class SaPermissionImpl implements StpInterface {
public List<String> getRoleList(Object loginId, String loginType) {
LoginUser loginUser = LoginHelper.getLoginUser();
UserType userType = UserType.getUserType(loginUser.getUserType());
if (userType == UserType.SYS_USER) {
if (userType == UserType.SYS_USER || userType == UserType.APP_USER) {
Long projectId = loginUser.getProjectId();
List<SysProjectRolePermissionVo> rolePermission = loginUser.getRolePermission();
if (CollUtil.isNotEmpty(rolePermission)) {
@ -87,9 +88,10 @@ public class SaPermissionImpl implements StpInterface {
} else {
return new ArrayList<>();
}
} else if (userType == UserType.APP_USER) {
// 其他端 自行根据业务编写
}
/* else if (userType == UserType.APP_USER) {
// 其他端 自行根据业务编写
}*/
return new ArrayList<>();
}
}