forked from gergely/calendar-social
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:
@@ -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
|
||||
|
Reference in New Issue
Block a user