MA-849: Change has_access return type

New classes for the return type, and changes to the has_access function and tests to make them compatible.
This commit is contained in:
tlindaliu
2015-06-23 11:15:08 -04:00
parent 4b4ce5f122
commit e0840d2d43
19 changed files with 471 additions and 189 deletions

View File

@@ -21,5 +21,5 @@ class LmsSearchInitializer(SearchInitializer):
course_key = CourseKey.from_string(kwargs['course_id'])
except InvalidKeyError:
course_key = SlashSeparatedCourseKey.from_deprecated_string(kwargs['course_id'])
staff_access = has_access(request.user, 'staff', course_key)
staff_access = bool(has_access(request.user, 'staff', course_key))
setup_masquerade(request, course_key, staff_access)