Skip to content

Commit

Permalink
Fix teachers useful permission issue (#806)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmi4er4 authored Feb 6, 2024
1 parent 999b893 commit 8f33328
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions apps/learning/permissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 2 additions & 1 deletion apps/learning/roles.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -181,6 +181,7 @@ class Roles(DjangoChoices):
CreateAssignmentCommentAsTeacher,
ViewAssignmentCommentAttachmentAsTeacher,
DeleteAssignmentAttachmentAsTeacher,
ViewTeachingFAQ,
ViewOwnGradebook,
EditOwnGradebook,
ViewStudentGroupAsTeacher,
Expand Down

0 comments on commit 8f33328

Please sign in to comment.