Big access control refactor
* All access control logic is now in access.py * It exports a single method for general use: has_access(user, object, action) - possible actions depend on object type (e.g. 'see_exists', 'enroll', 'staff') * Removed DARK_LAUNCH feature flag--it is now the default behavior * Replaced check_course with three separate more focused functions that use has_access Minor things: * note on using pdb in testing * moved time parsing helper into timeparse.py * x_modules now have a .start attribute (None if not in metadata)
Showing
- common/djangoapps/student/views.py 3 additions, 30 deletionscommon/djangoapps/student/views.py
- common/lib/xmodule/xmodule/course_module.py 5 additions, 21 deletionscommon/lib/xmodule/xmodule/course_module.py
- common/lib/xmodule/xmodule/timeparse.py 11 additions, 0 deletionscommon/lib/xmodule/xmodule/timeparse.py
- common/lib/xmodule/xmodule/x_module.py 22 additions, 1 deletioncommon/lib/xmodule/xmodule/x_module.py
- doc/development.md 1 addition, 0 deletionsdoc/development.md
- lms/djangoapps/courseware/access.py 266 additions, 0 deletionslms/djangoapps/courseware/access.py
- lms/djangoapps/courseware/courses.py 33 additions, 89 deletionslms/djangoapps/courseware/courses.py
- lms/djangoapps/courseware/module_render.py 11 additions, 9 deletionslms/djangoapps/courseware/module_render.py
- lms/djangoapps/courseware/tests/tests.py 8 additions, 10 deletionslms/djangoapps/courseware/tests/tests.py
- lms/djangoapps/courseware/views.py 21 additions, 29 deletionslms/djangoapps/courseware/views.py
- lms/djangoapps/simplewiki/views.py 13 additions, 13 deletionslms/djangoapps/simplewiki/views.py
- lms/djangoapps/staticbook/views.py 5 additions, 3 deletionslms/djangoapps/staticbook/views.py
- lms/envs/common.py 2 additions, 3 deletionslms/envs/common.py
- lms/templates/course_navigation.html 2 additions, 2 deletionslms/templates/course_navigation.html
- lms/templates/dashboard.html 6 additions, 5 deletionslms/templates/dashboard.html
- lms/templates/portal/course_about.html 5 additions, 4 deletionslms/templates/portal/course_about.html
Please register or sign in to comment