From 8f33328e820a13ab20e893591c506c68774e9943 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0=B9=20=D0=A7=D0=B5?= <39742182+Dmi4er4@users.noreply.github.com> Date: Tue, 6 Feb 2024 17:22:18 +0300 Subject: [PATCH] Fix teachers useful permission issue (#806) --- apps/learning/permissions.py | 5 +++++ apps/learning/roles.py | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/apps/learning/permissions.py b/apps/learning/permissions.py index e1c71d431..fbd1c7e29 100644 --- a/apps/learning/permissions.py +++ b/apps/learning/permissions.py @@ -308,6 +308,11 @@ class ViewFAQ(Permission): rule = has_active_status +@add_perm +class ViewTeachingFAQ(Permission): + name = "teaching.view_faq" + + @add_perm class ViewGradebook(Permission): name = "teaching.view_gradebook" diff --git a/apps/learning/roles.py b/apps/learning/roles.py index 8cab612f1..911133492 100644 --- a/apps/learning/roles.py +++ b/apps/learning/roles.py @@ -36,7 +36,7 @@ ViewAssignmentCommentAttachment, ViewAssignmentCommentAttachmentAsLearner, ViewAssignmentCommentAttachmentAsTeacher, ViewCourseEnrollment, ViewCourseEnrollments, ViewCourseNews, ViewCourseReviews, ViewCourses, - ViewEnrollment, ViewEnrollments, ViewFAQ, ViewGradebook, ViewLibrary, + ViewEnrollment, ViewEnrollments, ViewFAQ, ViewTeachingFAQ, ViewGradebook, ViewLibrary, ViewOwnEnrollment, ViewOwnEnrollments, ViewOwnGradebook, ViewOwnStudentAssignment, ViewOwnStudentAssignments, ViewRelatedStudentAssignment, ViewSchedule, ViewStudentAssignment, ViewStudentAssignmentList, ViewStudentGroup, @@ -181,6 +181,7 @@ class Roles(DjangoChoices): CreateAssignmentCommentAsTeacher, ViewAssignmentCommentAttachmentAsTeacher, DeleteAssignmentAttachmentAsTeacher, + ViewTeachingFAQ, ViewOwnGradebook, EditOwnGradebook, ViewStudentGroupAsTeacher,