Create our own anonymous user class

This is required so the anonymous user also has a time zone (which is required to render public events.)
This commit is contained in:
2018-07-08 22:19:51 +02:00
parent 943021e152
commit c770e6cfa6
2 changed files with 15 additions and 3 deletions

View File

@@ -17,6 +17,18 @@
"""Security related things for Calendar.social
"""
from flask_security import Security
from flask_security import Security, AnonymousUser as BaseAnonymousUser
security = Security()
class AnonymousUser(BaseAnonymousUser):
"""Anonymous user class for Calendar.social
"""
@property
def timezone(self):
"""The time zone of the anonymous user
"""
return None