Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修改查看知识图谱后能够文件上传问题 #4

Open
ct1tc opened this issue Mar 30, 2018 · 1 comment
Open

修改查看知识图谱后能够文件上传问题 #4

ct1tc opened this issue Mar 30, 2018 · 1 comment

Comments

@ct1tc
Copy link

ct1tc commented Mar 30, 2018

首先是找到了文件上传表单的上传映射,在mindmapController中,这里已经能够获取session属性用户名了,之后我在controller中定义了一个全局变量name,在运行到点击查看“知识图谱时”,由于open_ajax()这个方法中传递了选中行的userid参数,所以我在关于getShareMindNodeObject.do映射中将这个userid赋值给了之前定义的name变量。最后,通过在setUpload.do下的方法中我判断了,userid与name是否相同,如果不一致,StatusMap.a("3")利用Status类中的a()方法传递一个3:表示信息不一致,并返回字符串“无法在他人的知识图谱中上传文件“。

@huoji555
Copy link
Owner

在setUpload.do下的方法中通过 获取 前台传来的数据 nodeid 得到知识图谱的拥有者MIndUser,判断系统中当前登录用户 userid 是否与MIndUser相同,不同的话返回“不允许在他人的知识图谱中上传文件”

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants