{% set booking = session.booking %} {% set is_manager = current_user.is_manager %} {% set owner = booking.owner %} {% set pi = owner.get_pi() %} {% if is_manager or current_user == owner or current_user == pi %}
A session is only visible to the owner user or the principal investigator.