调整权限判断逻辑

master
Guo XIn 1 year ago
parent 62ab1a1038
commit 1a6ca60bd6
  1. 7
      shandan-system/src/main/java/com/keyware/shandan/bianmu/service/DirPermissionService.java

@ -232,7 +232,7 @@ public class DirPermissionService {
|| isDirOwnerOrgAllChildUser(user, dir);
} else {
// 归属者为普通用户:自己可见
return isOwnerSelf(user, dir);
return isDirOwnerOrgAllChildUser(user, dir);
}
}
//return isDirOwnerOrgUser(user, dir) || isDirOwnerOrgAllChildUser(user, dir);
@ -251,13 +251,14 @@ public class DirPermissionService {
// 归属者为部门, 当前部门所有人和直属下级部门的所有用户
return isDirOwnerOrgUser(user, dir) || isDirOwnerOrgChildUser(user, dir);
} else {
if (isAdmin(userCache.get(dir.getOwnerId()))) {
/*if (isAdmin(userCache.get(dir.getOwnerId()))) {
// 归属者为部门管理员:自己部门所有用户(如有2个或2个以上个部门管理员,虽然为同级,但依旧可见)可见
return isDirOwnerOrgUser(user, dir);
} else {
// 归属者为普通用户:自己可见
return isOwnerSelf(user, dir);
}
}*/
return isDirOwnerOrgUser(user, dir);
}
}