fix(资料中心): 81828

This commit is contained in:
yjz
2024-02-07 14:40:58 +08:00
parent 41553e116f
commit 121d62599f
@@ -82,12 +82,13 @@ public class LawsDataCenterFileServiceImpl extends ServiceImpl<LawsDataCenterFil
queryWrapper.eq(StringUtils.isNotBlank(lawsDataCenterFile.getFolderId()), "folder_id", lawsDataCenterFile.getFolderId());
List<String> adminRoleCodeList = Arrays.asList(adminRoleCode.split(","));
Collection<String> intersection = CollectionUtils.intersection(Arrays.asList(CurrentUserUtil.getRoles().split(",")), adminRoleCodeList);
String userId = CurrentUserUtil.getId();
if (!CurrentUserUtil.getRoles().contains(FieldCommon.ROLE_ADMIN) && CollectionUtils.isEmpty(intersection)) {
queryWrapper.and(qw -> qw
.eq("owner_id", CurrentUserUtil.getId())
.or().like("auth_view_ids", CurrentUserUtil.getId())
.or().like("auth_manage_ids", CurrentUserUtil.getId())
.or().like("push_range_ids", CurrentUserUtil.getId())
.eq("owner_id", userId)
.or().like("auth_view_ids", userId)
.or().like("auth_manage_ids", userId)
.or().like("push_range_ids", userId)
.or().eq("default_folder", YesOrNoEnum.YES.getValue())
);
}
@@ -97,7 +98,8 @@ public class LawsDataCenterFileServiceImpl extends ServiceImpl<LawsDataCenterFil
for (LawsDataCenterFile file : result.getRecords()) {
// 管理权限标识
String authManageIds = file.getAuthManageIds();
if (StringUtils.isBlank(authManageIds) || !authManageIds.contains(CurrentUserUtil.getId())){
if (!userId.equals(file.getOwnerId())
&& (StringUtils.isBlank(authManageIds) || !authManageIds.contains(userId))){
file.setAuthManageTag(false);
}
}