diff --git a/cms/djangoapps/auth/authz.py b/cms/djangoapps/auth/authz.py index fec25c5ba2..2f6f15cf63 100644 --- a/cms/djangoapps/auth/authz.py +++ b/cms/djangoapps/auth/authz.py @@ -87,7 +87,8 @@ def remove_user_from_course_group(caller, user, location, role): def is_user_in_course_group_role(user, location, role): if user.is_active and user.is_authenticated: - return user.groups.filter(name=get_course_groupname_for_role(location,role)).count() > 0 + # all "is_staff" flagged accounts belong to all groups + return user.is_staff or user.groups.filter(name=get_course_groupname_for_role(location,role)).count() > 0 return False diff --git a/cms/djangoapps/contentstore/views.py b/cms/djangoapps/contentstore/views.py index 61e18600a0..1443f37c2d 100644 --- a/cms/djangoapps/contentstore/views.py +++ b/cms/djangoapps/contentstore/views.py @@ -99,6 +99,7 @@ def index(request): def has_access(user, location, role=EDITOR_ROLE_NAME): '''Return True if user allowed to access this piece of data''' '''Note that the CMS permissions model is with respect to courses''' + '''There is a super-admin permissions if user.is_staff is set''' return is_user_in_course_group_role(user, get_course_location_for_item(location), role)