31 lines
1.4 KiB
Python
31 lines
1.4 KiB
Python
"""
|
|
Permissions for the instructor dashboard and associated actions
|
|
"""
|
|
|
|
from bridgekeeper import perms
|
|
from bridgekeeper.rules import is_staff
|
|
from lms.djangoapps.courseware.rules import HasAccessRule
|
|
|
|
ALLOW_STUDENT_TO_BYPASS_ENTRANCE_EXAM = 'instructor.allow_student_to_bypass_entrance_exam'
|
|
ASSIGN_TO_COHORTS = 'instructor.assign_to_cohorts'
|
|
EDIT_COURSE_ACCESS = 'instructor.edit_course_access'
|
|
EDIT_FORUM_ROLES = 'instructor.edit_forum_roles'
|
|
EDIT_INVOICE_VALIDATION = 'instructor.edit_invoice_validation'
|
|
ENABLE_CERTIFICATE_GENERATION = 'instructor.enable_certificate_generation'
|
|
GENERATE_CERTIFICATE_EXCEPTIONS = 'instructor.generate_certificate_exceptions'
|
|
GENERATE_BULK_CERTIFICATE_EXCEPTIONS = 'instructor.generate_bulk_certificate_exceptions'
|
|
GIVE_STUDENT_EXTENSION = 'instructor.give_student_extension'
|
|
VIEW_ISSUED_CERTIFICATES = 'instructor.view_issued_certificates'
|
|
|
|
|
|
perms[ALLOW_STUDENT_TO_BYPASS_ENTRANCE_EXAM] = HasAccessRule('staff')
|
|
perms[ASSIGN_TO_COHORTS] = HasAccessRule('staff')
|
|
perms[EDIT_COURSE_ACCESS] = HasAccessRule('instructor')
|
|
perms[EDIT_FORUM_ROLES] = HasAccessRule('staff')
|
|
perms[EDIT_INVOICE_VALIDATION] = HasAccessRule('staff')
|
|
perms[ENABLE_CERTIFICATE_GENERATION] = is_staff
|
|
perms[GENERATE_CERTIFICATE_EXCEPTIONS] = is_staff
|
|
perms[GENERATE_BULK_CERTIFICATE_EXCEPTIONS] = is_staff
|
|
perms[GIVE_STUDENT_EXTENSION] = HasAccessRule('staff')
|
|
perms[VIEW_ISSUED_CERTIFICATES] = HasAccessRule('staff')
|