未验证 提交 292b0fce 编写于 作者: X xingchun-chen 提交者: GitHub

Merge pull request #3980 from lgcareer/1.3.3-release-fix3958

[Fix-#3958][api] files should not be created successfully in the directory of the authorized file
......@@ -961,6 +961,19 @@ public class ResourcesService extends BaseService {
if (!result.getCode().equals(Status.SUCCESS.getCode())) {
return result;
}
if (pid != -1) {
Resource parentResource = resourcesMapper.selectById(pid);
if (parentResource == null) {
putMsg(result, Status.PARENT_RESOURCE_NOT_EXIST);
return result;
}
if (!hasPerm(loginUser, parentResource.getUserId())) {
putMsg(result, Status.USER_NO_OPERATION_PERM);
return result;
}
}
// save data
Date now = new Date();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册