latest changes
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
"""Server-side restrictions for the public demonstration account."""
|
||||
|
||||
from .models import UserSettings
|
||||
|
||||
|
||||
def is_demo_user(user):
|
||||
return bool(getattr(user, 'is_authenticated', False) and
|
||||
UserSettings.objects.filter(user_id=user.pk, is_demo=True).exists())
|
||||
Reference in New Issue
Block a user