Consolidate access checks for prereqs and surveys.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user