Browse Source

Merge pull request #269 in DESIGN/design from ~YAOH.WU/design:release/10.0 to release/10.0

* commit '3a202903cc2ee3e36119ce243693e1b3a8eda81a':
  REPORT-7941 子目录有全部权限父目录部分权限场景时显示异常
research/10.0
yaoh.wu 7 years ago
parent
commit
ec35e69a29
  1. 16
      designer-base/src/main/java/com/fr/design/gui/itree/filetree/TemplateFileTree.java

16
designer-base/src/main/java/com/fr/design/gui/itree/filetree/TemplateFileTree.java

@ -222,22 +222,18 @@ public class TemplateFileTree extends EnvFileTree {
String fileName = fileNode.getEnvPath(); String fileName = fileNode.getEnvPath();
String[] auPaths = auPath.split(CoreConstants.SEPARATOR); String[] auPaths = auPath.split(CoreConstants.SEPARATOR);
String[] nodePaths = fileName.split(CoreConstants.SEPARATOR); String[] nodePaths = fileName.split(CoreConstants.SEPARATOR);
// 待判断目录是有权限目录或者有权限目录的子目录,全部权限
if (auPaths.length == nodePaths.length) { if (auPaths.length <= nodePaths.length) {
for (int i = 0; i < auPaths.length; i++) { for (int i = 0; i < auPaths.length; i++) {
if (!auPaths[i].equals(nodePaths[i])) { if (!auPaths[i].equals(nodePaths[i])) {
return false; return false;
} }
} }
return fileNode.isDirectory(); return fileNode.isDirectory();
} else { }
int len = Math.min(auPaths.length, nodePaths.length); // 其他情况半权限
for (int i = 0; i < len; i++) { else {
if (!auPaths[i].equals(nodePaths[i])) { return false;
return false;
}
}
return true;
} }
} }

Loading…
Cancel
Save