def METHOD_NAME(request):
    request.is_orga = False
    request.orga_events = []
    if not request.user.is_anonymous:
        if request.user.is_administrator:
            request.orga_events = Event.objects.order_by("date_from")
            request.is_orga = True
        else:
            request.orga_events = request.user.get_events_for_permission().order_by(
                "date_from"
            )
            event = getattr(request, "event", None)
            if event:
                request.is_orga = event in request.orga_events
                request.is_reviewer = event.teams.filter(
                    members__in=[request.user], is_reviewer=True
                ).exists()
                request.user.team_permissions[
                    event.slug
                ] = request.user.get_permissions_for_event(event)