Browse Source

🎉 角色判断逻辑修复

test
smallchill 5 years ago
parent
commit
467e707746
  1. 2
      blade-service/blade-system/src/main/java/org/springblade/system/service/impl/RoleServiceImpl.java

2
blade-service/blade-system/src/main/java/org/springblade/system/service/impl/RoleServiceImpl.java

@ -60,7 +60,7 @@ public class RoleServiceImpl extends ServiceImpl<RoleMapper, Role> implements IR
public List<RoleVO> tree(String tenantId) {
String userRole = SecureUtil.getUserRole();
String excludeRole = null;
if (!CollectionUtil.contains(Func.toStrArray(userRole), RoleConstant.ADMINISTRATOR) && !CollectionUtil.contains(Func.toStrArray(userRole), RoleConstant.ADMINISTRATOR)) {
if (!CollectionUtil.contains(Func.toStrArray(userRole), RoleConstant.ADMIN) && !CollectionUtil.contains(Func.toStrArray(userRole), RoleConstant.ADMINISTRATOR)) {
excludeRole = RoleConstant.ADMINISTRATOR;
}
return ForestNodeMerger.merge(baseMapper.tree(tenantId, excludeRole));

Loading…
Cancel
Save