haldis/app/models/anonymous_user.py

26 lines
500 B
Python
Raw Permalink Normal View History

2019-09-10 01:06:11 +02:00
"AnonymouseUser for people who are not logged in the normal way"
from typing import List
2019-09-10 01:06:11 +02:00
# pylint: disable=R0201,C0111
class AnonymouseUser:
id = None
def association_list(self) -> List[str]:
return []
2019-09-08 00:41:50 +02:00
def is_active(self) -> bool:
return False
2019-09-08 00:41:50 +02:00
def is_authenticated(self) -> bool:
return False
2019-09-08 00:41:50 +02:00
def is_anonymous(self) -> bool:
return True
2019-09-08 00:41:50 +02:00
def is_admin(self) -> bool:
return False
2019-09-08 00:41:50 +02:00
def get_id(self) -> None:
return None