from django.conf import settings


def add_organizations(request):
    if not request.user.is_authenticated:
        return {"user_organizations": []}

    return {"user_organizations": request.user.organizations.all().order_by("name")}


def add_beta_banner(request):
    return {"show_beta_banner": settings.SERVALA_SHOW_BETA_BANNER}
