"""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())