diff --git a/hoj-springboot/.idea/compiler.xml b/hoj-springboot/.idea/compiler.xml
index 7b623431..f0216164 100644
--- a/hoj-springboot/.idea/compiler.xml
+++ b/hoj-springboot/.idea/compiler.xml
@@ -8,8 +8,8 @@
-
+
diff --git a/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/oj/JudgeController.java b/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/oj/JudgeController.java
index 0d46d7dd..a773c47a 100644
--- a/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/oj/JudgeController.java
+++ b/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/oj/JudgeController.java
@@ -269,7 +269,6 @@ public class JudgeController {
* @Since 2021/1/2
*/
@GetMapping("/submission")
- @RequiresAuthentication
public CommonResult getSubmission(@RequestParam(value = "submitId", required = true) Long submitId, HttpServletRequest request) {
Judge judge = judgeService.getById(submitId);
if (judge == null) {
@@ -289,10 +288,10 @@ public class JudgeController {
if (userRolesVo != null) { // 当前是登陆状态
// 需要判断是否为当前登陆用户自己的提交代码
if (!judge.getUid().equals(userRolesVo.getUid())) {
- return CommonResult.errorResponse("对不起!该提交并未分享,您无权查看!");
+ judge.setCode(null);
}
- } else { // 不是登陆状态,就直接无权限
- return CommonResult.errorResponse("对不起!该提交并未分享,您无权查看!");
+ } else { // 不是登陆状态,就直接无权限查看代码
+ judge.setCode(null);
}
}
@@ -423,7 +422,6 @@ public class JudgeController {
* @Since 2020/10/29
*/
@GetMapping("/get-all-case-result")
- @RequiresAuthentication
public CommonResult getALLCaseResult(@RequestParam(value = "submitId", required = true) Long submitId) {
Judge judge = judgeService.getById(submitId);
diff --git a/hoj-vue/src/App.vue b/hoj-vue/src/App.vue
index df76b3e0..e947a4bb 100644
--- a/hoj-vue/src/App.vue
+++ b/hoj-vue/src/App.vue
@@ -490,3 +490,123 @@ footer h1 {
}
}
+
diff --git a/hoj-vue/src/components/admin/Editor.vue b/hoj-vue/src/components/admin/Editor.vue
index ef4799a9..a8f6d796 100644
--- a/hoj-vue/src/components/admin/Editor.vue
+++ b/hoj-vue/src/components/admin/Editor.vue
@@ -124,125 +124,7 @@ export default {
};
diff --git a/hoj-vue/src/router/ojRoutes.js b/hoj-vue/src/router/ojRoutes.js
index 1c4ad69e..8e9b29e9 100644
--- a/hoj-vue/src/router/ojRoutes.js
+++ b/hoj-vue/src/router/ojRoutes.js
@@ -1,28 +1,27 @@
-const Home= ()=>import('@/views/oj/Home.vue')
-const SetNewPassword= ()=>import("@/views/oj/user/SetNewPassword.vue")
-const UserHome= ()=>import("@/views/oj/user/UserHome.vue")
-const Setting= ()=>import("@/views/oj/user/Setting.vue")
-const ProblemLIst= ()=>import("@/views/oj/problem/ProblemList.vue")
-const Logout= ()=>import("@/views/oj/user/Logout.vue")
-const SubmissionList= ()=>import("@/views/oj/status/SubmissionList.vue")
-const SubmissionDetails= ()=>import("@/views/oj/status/SubmissionDetails.vue")
-const ContestList= ()=>import("@/views/oj/contest/ContestList.vue")
-const Problem= ()=>import("@/views/oj/problem/Problem.vue")
-const ACMRank= ()=>import("@/views/oj/rank/ACMRank.vue")
-const OIRank= ()=>import("@/views/oj/rank/OIRank.vue")
-const ContestDetails= ()=>import("@/views/oj/contest/ContestDetails.vue")
-const ContestProblemList= ()=>import("@/views/oj/contest/children/ContestProblemList.vue")
-const ContestRank= ()=>import("@/views/oj/contest/children/ContestRank.vue")
-const ACMInfoAdmin= ()=>import("@/views/oj/contest/children/ACMInfoAdmin.vue")
-const Announcements= ()=>import("@/components/oj/common/Announcements.vue")
-const ContestComment= ()=>import("@/views/oj/contest/children/ContestComment.vue")
-const ContestRejudgeAdmin= ()=>import("@/views/oj/contest/children/ContestRejudgeAdmin.vue")
-const DiscussionList= ()=>import("@/views/oj/discussion/discussionList.vue")
-const Discussion= ()=>import("@/views/oj/discussion/discussion.vue")
-const Introduction= ()=>import("@/views/oj/about/Introduction.vue")
-const Developer= ()=>import("@/views/oj/about/Developer.vue")
-const NotFound= ()=>import("@/views/404.vue")
-
+import Home from '@/views/oj/Home.vue'
+import SetNewPassword from "@/views/oj/user/SetNewPassword.vue"
+import UserHome from "@/views/oj/user/UserHome.vue"
+import Setting from "@/views/oj/user/Setting.vue"
+import ProblemLIst from "@/views/oj/problem/ProblemList.vue"
+import Logout from "@/views/oj/user/Logout.vue"
+import SubmissionList from "@/views/oj/status/SubmissionList.vue"
+import SubmissionDetails from "@/views/oj/status/SubmissionDetails.vue"
+import ContestList from "@/views/oj/contest/ContestList.vue"
+import Problem from "@/views/oj/problem/Problem.vue"
+import ACMRank from "@/views/oj/rank/ACMRank.vue"
+import OIRank from "@/views/oj/rank/OIRank.vue"
+import ContestDetails from "@/views/oj/contest/ContestDetails.vue"
+import ContestProblemList from "@/views/oj/contest/children/ContestProblemList.vue"
+import ContestRank from "@/views/oj/contest/children/ContestRank.vue"
+import ACMInfoAdmin from "@/views/oj/contest/children/ACMInfoAdmin.vue"
+import Announcements from "@/components/oj/common/Announcements.vue"
+import ContestComment from "@/views/oj/contest/children/ContestComment.vue"
+import ContestRejudgeAdmin from "@/views/oj/contest/children/ContestRejudgeAdmin.vue"
+import DiscussionList from "@/views/oj/discussion/discussionList.vue"
+import Discussion from "@/views/oj/discussion/discussion.vue"
+import Introduction from "@/views/oj/about/Introduction.vue"
+import Developer from "@/views/oj/about/Developer.vue"
+import NotFound from "@/views/404.vue"
const ojRoutes = [
{
diff --git a/hoj-vue/src/views/oj/contest/children/ContestComment.vue b/hoj-vue/src/views/oj/contest/children/ContestComment.vue
index d684086e..786c0680 100644
--- a/hoj-vue/src/views/oj/contest/children/ContestComment.vue
+++ b/hoj-vue/src/views/oj/contest/children/ContestComment.vue
@@ -2,6 +2,7 @@