修改权限
This commit is contained in:
@ -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<>();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user