fix(88734): 【水平越权】文档拆分发布接口未做水平越权
This commit is contained in:
+13
@@ -1205,6 +1205,19 @@ public class DocumentSplitServiceImpl implements IDocumentSplitService {
|
|||||||
if (b){
|
if (b){
|
||||||
// 水平越权
|
// 水平越权
|
||||||
isHorizontalOverstep(id);
|
isHorizontalOverstep(id);
|
||||||
|
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
|
int count = sarFileSplitInfoService.count(
|
||||||
|
new LambdaQueryWrapper<SarFileSplitInfoEO>()
|
||||||
|
.eq(SarFileSplitInfoEO::getId, id)
|
||||||
|
.eq(SarFileSplitInfoEO::getAuthor, loginUser.getId()));
|
||||||
|
if (count <= 0){
|
||||||
|
if(LanguageEnum.CN.equals(MessageUtils.getLanguage())) {
|
||||||
|
throw new JeroBootException("无权限!");
|
||||||
|
}else{
|
||||||
|
throw new JeroBootException("No access!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
// 文档拆分信息(旧)
|
// 文档拆分信息(旧)
|
||||||
DocumentSplitInfo oldInfo = documentSplitMapper.queryDocumentSplitInfoById(id);
|
DocumentSplitInfo oldInfo = documentSplitMapper.queryDocumentSplitInfoById(id);
|
||||||
|
|||||||
Reference in New Issue
Block a user