diff --git a/src/e2e/java/teammates/e2e/cases/InstructorFeedbackEditPageE2ETest.java b/src/e2e/java/teammates/e2e/cases/InstructorFeedbackEditPageE2ETest.java index baafc6ed93c..c68d2f62fb1 100644 --- a/src/e2e/java/teammates/e2e/cases/InstructorFeedbackEditPageE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/InstructorFeedbackEditPageE2ETest.java @@ -35,6 +35,9 @@ protected void prepareTestData() { testData = loadDataBundle("/InstructorFeedbackEditPageE2ETest.json"); removeAndRestoreDataBundle(testData); + sqlTestData = removeAndRestoreSqlDataBundle( + loadSqlDataBundle("/InstructorFeedbackEditPageE2ETest_SqlEntities.json")); + instructor = testData.instructors.get("instructor"); feedbackSession = testData.feedbackSessions.get("openSession"); course = testData.courses.get("course"); diff --git a/src/e2e/resources/data/InstructorFeedbackEditPageE2ETest.json b/src/e2e/resources/data/InstructorFeedbackEditPageE2ETest.json index 384c97edbf6..1ef60eddc81 100644 --- a/src/e2e/resources/data/InstructorFeedbackEditPageE2ETest.json +++ b/src/e2e/resources/data/InstructorFeedbackEditPageE2ETest.json @@ -1,12 +1,4 @@ { - "accounts": { - "instructorWithSessions": { - "googleId": "tm.e2e.IFEdit.instructor", - "name": "Teammates Test", - "email": "tmms.test@gmail.tmt", - "readNotifications": {} - } - }, "courses": { "course": { "id": "tm.e2e.IFEdit.CS2104", diff --git a/src/e2e/resources/data/InstructorFeedbackEditPageE2ETest_SqlEntities.json b/src/e2e/resources/data/InstructorFeedbackEditPageE2ETest_SqlEntities.json new file mode 100644 index 00000000000..0fe05331422 --- /dev/null +++ b/src/e2e/resources/data/InstructorFeedbackEditPageE2ETest_SqlEntities.json @@ -0,0 +1,10 @@ +{ + "accounts": { + "instructorWithSessions": { + "id": "00000000-0000-4000-8000-000000000001", + "googleId": "tm.e2e.IFEdit.instructor", + "name": "Teammates Test", + "email": "tmms.test@gmail.tmt" + } + } +} diff --git a/src/main/java/teammates/ui/webapi/DeleteFeedbackQuestionAction.java b/src/main/java/teammates/ui/webapi/DeleteFeedbackQuestionAction.java index 15b3ff7cf8b..7e726696135 100644 --- a/src/main/java/teammates/ui/webapi/DeleteFeedbackQuestionAction.java +++ b/src/main/java/teammates/ui/webapi/DeleteFeedbackQuestionAction.java @@ -43,6 +43,7 @@ void checkSpecificAccessControl() throws UnauthorizedAccessException { gateKeeper.verifyAccessible(logic.getInstructorForGoogleId(questionAttributes.getCourseId(), userInfo.getId()), getNonNullFeedbackSession(questionAttributes.getFeedbackSessionName(), questionAttributes.getCourseId()), Const.InstructorPermissions.CAN_MODIFY_SESSION); + return; } gateKeeper.verifyAccessible(sqlLogic.getInstructorByGoogleId(question.getCourseId(), userInfo.getId()),