Consolidate access checks for prereqs and surveys.

This commit is contained in:
Diana Huang
2017-07-18 11:07:26 -04:00
parent 27cd3d199d
commit c338b751f2
13 changed files with 81 additions and 83 deletions

View File

@@ -15,5 +15,13 @@ class Redirect(Exception):
class CourseAccessRedirect(Redirect):
"""
Redirect raised when user does not have access to a course.
Arguments:
url (string): The redirect url.
access_error (AccessErro): The AccessError that caused the redirect.
The AccessError contains messages for developers and users explaining why
the user was denied access. These strings can then be exposed to the user.
"""
pass
def __init__(self, url, access_error=None):
super(CourseAccessRedirect, self).__init__(url)
self.access_error = access_error