'Verifies whether the requesting user can access blocks in the course.'

@staticmethod
def _verify_requesting_user(requesting_user, course_key):

    if (not permissions.can_access_self_blocks(requesting_user, course_key)):
        raise PermissionDenied("Course    blocks    for    '{requesting_username}'    cannot    be    accessed.".format(requesting_username=requesting_user.username))
    return requesting_user
