Commit Graph

20 Commits

Author SHA1 Message Date
Calen Pennington
cfae1cdf62 Pep8 autofixes 2013-02-06 11:13:50 -05:00
Bridger Maxwell
adbe71b5df Got simplewiki just cleaned up enough to work again, so I could view a page for reference. 2012-08-19 19:57:19 -04:00
Victor Shnayder
c4afddfd38 Fix staff access check in simplewiki 2012-08-15 12:56:01 -04:00
Victor Shnayder
9425bbba60 Address other comment on #413
- don't call has_access directly from template, pass a staff_access variable instead
2012-08-15 10:28:08 -04:00
Victor Shnayder
2df3a6ef11 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)
2012-08-14 23:30:37 -04:00
Victor Shnayder
d7f94a05b7 Add DARK_LAUNCH functionality
* pass user to check_course
* if dark launch feature enabled, users with staff access to course
can see courseware before start date.  Students still can't.
* tests.
* Remaining: enrollment view has custom access control.  Need to check it.
2012-08-12 16:23:31 -04:00
Calen Pennington
1d1a9173a4 Cleaning up pep8 violations 2012-07-23 14:44:40 -04:00
Bridger Maxwell
938f0d1995 Changed check_course from a decorator to a regular function that throws exceptions. Much easier to understand now. 2012-07-17 11:12:42 -04:00
Bridger Maxwell
ecc50314f7 Added a decorator that prevents access to course pages until the course has started. 2012-07-13 10:31:36 -04:00
Bridger Maxwell
08f5fe7fc9 Fixed wiki urls for new course ids. 2012-07-09 15:53:50 -04:00
Bridger Maxwell
4d349fbd9d Fixed wiki error page again. 2012-07-06 17:42:01 -04:00
Bridger Maxwell
6d7b477982 Fixed wiki revision feed. 2012-07-06 12:55:05 -04:00
Bridger Maxwell
ac0a776818 First pass at getting both independent and in-course wiki viewing. 2012-07-05 21:20:35 -04:00
Bridger Maxwell
953cab047a Added check that namespace for a new course is created. 2012-07-05 08:55:35 -07:00
Bridger Maxwell
072de594ff Fixed wiki error pages a bit. 2012-07-05 08:14:41 -07:00
Bridger Maxwell
064274a756 Most of the wiki pages are now loading without errors. 2012-07-03 09:50:58 -07:00
Bridger Maxwell
baa2c06803 Got history and view revision working on wiki. 2012-06-29 20:53:36 -04:00
Bridger Maxwell
b69deb698d Got the view page of the wiki rendering. Most of it is a styling mess. 2012-06-29 12:05:55 -04:00
Bridger Maxwell
2a9a15ad66 Beginning to port wiki to multicourse. (Unstable) 2012-06-28 15:11:00 -04:00
Calen Pennington
5ba03130aa Moving LMS code into subdirectory 2012-06-06 14:09:01 -04:00