from flask_login import AnonymousUserMixin class AnonymousUser(AnonymousUserMixin): def can(self, permissions): return False @property def is_administrator(self): return False