'Check if the supplied django user has access to this role.
Arguments:
user: user to check against access to role
check_user_activation: Indicating whether or not we need to check
user activation while checking user roles
Return:
bool identifying if user has that particular role or not'

def has_user(self, user, check_user_activation=True):

    if (check_user_activation and (not (user.is_authenticated() and user.is_active))):
        return False
    if (not hasattr(user, '_roles')):
        user._roles = RoleCache(user)
    return user._roles.has_role(self._role_name, self.course_key, self.org)
