Merge remote-tracking branch 'origin/apps_dev' into apps_dev
This commit is contained in:
commit
76134d5b14
Binary file not shown.
@ -8359,15 +8359,17 @@ public class CoeProcessLevelWeb extends ActionWeb {
|
||||
}
|
||||
|
||||
// 新增的架构或者文件夹 自动加权 遍历所有小组 判断父级文件夹/架构是否在该小组下是否有权限
|
||||
if (UtilString.isNotEmpty(parentId) && parentId.length() == 36){
|
||||
List<TeamInfo> allTeamInfo = CoeCooperationAPIManager.getInstance().getAllTeamInfo();
|
||||
allTeamInfo.parallelStream().forEach(teamInfo -> {
|
||||
boolean isPerm = teamInfo.getVersionIds().stream().anyMatch(teamPermId -> teamPermId.equals(parentId));
|
||||
if (isPerm && !teamInfo.getVersionIds().contains(model.getVersionId())){ // 当前新建的文件 父级有权限且自身没在小组权限中
|
||||
CoeCooperationAPIManager.getInstance().addPermDataToTeamAndRole(teamInfo.getTeamId(), model.getVersionId());
|
||||
}
|
||||
});
|
||||
}
|
||||
new Thread(() -> {
|
||||
if (UtilString.isNotEmpty(parentId) && parentId.length() == 36){
|
||||
List<TeamInfo> allTeamInfo = CoeCooperationAPIManager.getInstance().getAllTeamInfo();
|
||||
allTeamInfo.parallelStream().forEach(teamInfo -> {
|
||||
boolean isPerm = teamInfo.getVersionIds().stream().anyMatch(teamPermId -> teamPermId.equals(parentId));
|
||||
if (isPerm && !teamInfo.getVersionIds().contains(model.getVersionId())){ // 当前新建的文件 父级有权限且自身没在小组权限中
|
||||
CoeCooperationAPIManager.getInstance().addPermDataToTeamAndRole(teamInfo.getTeamId(), model.getVersionId());
|
||||
}
|
||||
});
|
||||
}
|
||||
}).start();
|
||||
|
||||
// 操作行为日志记录
|
||||
if (SDK.getAppAPI().getPropertyBooleanValue(CoEConstant.APP_ID, "IS_RECORD_OP_LOG", false)) {
|
||||
@ -8467,15 +8469,17 @@ public class CoeProcessLevelWeb extends ActionWeb {
|
||||
}
|
||||
|
||||
// 新增的架构或者文件夹 自动加权 遍历所有小组 判断父级文件夹/架构是否在该小组下是否有权限
|
||||
if (UtilString.isNotEmpty(parentId) && parentId.length() == 36){
|
||||
List<TeamInfo> allTeamInfo = CoeCooperationAPIManager.getInstance().getAllTeamInfo();
|
||||
allTeamInfo.parallelStream().forEach(teamInfo -> {
|
||||
boolean isPerm = teamInfo.getVersionIds().stream().anyMatch(teamPermId -> teamPermId.equals(parentId));
|
||||
if (isPerm && !teamInfo.getVersionIds().contains(model.getVersionId())){ // 当前新建的文件 父级有权限且自身没在小组权限中
|
||||
CoeCooperationAPIManager.getInstance().addPermDataToTeamAndRole(teamInfo.getTeamId(), model.getVersionId());
|
||||
}
|
||||
});
|
||||
}
|
||||
new Thread(() -> {
|
||||
if (UtilString.isNotEmpty(parentId) && parentId.length() == 36){
|
||||
List<TeamInfo> allTeamInfo = CoeCooperationAPIManager.getInstance().getAllTeamInfo();
|
||||
allTeamInfo.parallelStream().forEach(teamInfo -> {
|
||||
boolean isPerm = teamInfo.getVersionIds().stream().anyMatch(teamPermId -> teamPermId.equals(parentId));
|
||||
if (isPerm && !teamInfo.getVersionIds().contains(model.getVersionId())){ // 当前新建的文件 父级有权限且自身没在小组权限中
|
||||
CoeCooperationAPIManager.getInstance().addPermDataToTeamAndRole(teamInfo.getTeamId(), model.getVersionId());
|
||||
}
|
||||
});
|
||||
}
|
||||
}).start();
|
||||
|
||||
ro.put("id", id);
|
||||
// 操作行为日志记录
|
||||
@ -8624,15 +8628,17 @@ public class CoeProcessLevelWeb extends ActionWeb {
|
||||
}
|
||||
|
||||
// 新增的架构或者文件夹 自动加权 遍历所有小组 判断父级文件夹/架构是否在该小组下是否有权限
|
||||
if (UtilString.isNotEmpty(parentId) && parentId.length() == 36){
|
||||
List<TeamInfo> allTeamInfo = CoeCooperationAPIManager.getInstance().getAllTeamInfo();
|
||||
allTeamInfo.parallelStream().forEach(teamInfo -> {
|
||||
boolean isPerm = teamInfo.getVersionIds().stream().anyMatch(teamPermId -> teamPermId.equals(parentId));
|
||||
if (isPerm && !teamInfo.getVersionIds().contains(model.getVersionId())){ // 当前新建的文件 父级有权限且自身没在小组权限中
|
||||
CoeCooperationAPIManager.getInstance().addPermDataToTeamAndRole(teamInfo.getTeamId(), model.getVersionId());
|
||||
}
|
||||
});
|
||||
}
|
||||
new Thread(() -> {
|
||||
if (UtilString.isNotEmpty(parentId) && parentId.length() == 36){
|
||||
List<TeamInfo> allTeamInfo = CoeCooperationAPIManager.getInstance().getAllTeamInfo();
|
||||
allTeamInfo.parallelStream().forEach(teamInfo -> {
|
||||
boolean isPerm = teamInfo.getVersionIds().stream().anyMatch(teamPermId -> teamPermId.equals(parentId));
|
||||
if (isPerm && !teamInfo.getVersionIds().contains(model.getVersionId())){ // 当前新建的文件 父级有权限且自身没在小组权限中
|
||||
CoeCooperationAPIManager.getInstance().addPermDataToTeamAndRole(teamInfo.getTeamId(), model.getVersionId());
|
||||
}
|
||||
});
|
||||
}
|
||||
}).start();
|
||||
|
||||
ro.put("id", id);
|
||||
// 操作行为日志记录
|
||||
@ -11036,18 +11042,20 @@ public String deleteReply(String replyid, String messageid) {
|
||||
}
|
||||
|
||||
// 移动的文件/文件夹/架构 只要有一个在当前小组数据权限中 则 目标文件/文件夹/架构及所有直接父级都放入小组权限中
|
||||
List<TeamInfo> allTeamInfo = CoeCooperationAPIManager.getInstance().getAllTeamInfo();
|
||||
allTeamInfo.parallelStream().forEach(teamInfo -> {
|
||||
boolean isPerm = teamInfo.getVersionIds().stream().anyMatch(verId -> sourceList.stream().anyMatch(palRepositoryModel -> palRepositoryModel.getVersionId().equals(verId)));
|
||||
if (isPerm){
|
||||
Set<String> toBeInsertPermIds = new HashSet<>();
|
||||
recursionLookUp(targetId, toBeInsertPermIds);
|
||||
toBeInsertPermIds = toBeInsertPermIds.stream()
|
||||
.filter(permId -> !teamInfo.getVersionIds().contains(permId))
|
||||
.collect(Collectors.toSet());
|
||||
CoeCooperationAPIManager.getInstance().addPermDataToTeamAndRoleBatch(teamInfo.getTeamId(), toBeInsertPermIds);
|
||||
}
|
||||
});
|
||||
new Thread(() -> {
|
||||
List<TeamInfo> allTeamInfo = CoeCooperationAPIManager.getInstance().getAllTeamInfo();
|
||||
allTeamInfo.parallelStream().forEach(teamInfo -> {
|
||||
boolean isPerm = teamInfo.getVersionIds().stream().anyMatch(verId -> sourceList.stream().anyMatch(palRepositoryModel -> palRepositoryModel.getVersionId().equals(verId)));
|
||||
if (isPerm){
|
||||
Set<String> toBeInsertPermIds = new HashSet<>();
|
||||
recursionLookUp(targetId, toBeInsertPermIds);
|
||||
toBeInsertPermIds = toBeInsertPermIds.stream()
|
||||
.filter(permId -> !teamInfo.getVersionIds().contains(permId))
|
||||
.collect(Collectors.toSet());
|
||||
CoeCooperationAPIManager.getInstance().addPermDataToTeamAndRoleBatch(teamInfo.getTeamId(), toBeInsertPermIds);
|
||||
}
|
||||
});
|
||||
}).start();
|
||||
|
||||
/**
|
||||
* by bzp
|
||||
|
||||
Loading…
Reference in New Issue
Block a user