Change user.is_authenticated to user.is_authenticated() in roles.py.
LMS-2442