LMS-11331, LMS-11345 Make auth check branch agnostic; fix deserialize keys

This commit is contained in:
Don Mitchell
2014-09-04 22:16:25 -04:00
committed by Nimisha Asthagiri
parent 3a772752de
commit 935d5dee34
3 changed files with 21 additions and 7 deletions

View File

@@ -20,7 +20,8 @@ def has_course_access(user, course_key, role=CourseStaffRole):
return True
if OrgStaffRole(org=course_key.org).has_user(user):
return True
return auth.has_access(user, role(course_key))
# temporary to ensure we give universal access given a course until we impl branch specific perms
return auth.has_access(user, role(course_key.for_branch(None)))
def get_user_role(user, course_id):