{% load rules i18n %} {% has_perm 'core.view_avatar_rule' request.user person_or_user as can_view_avatar %} {% has_perm 'core.view_photo_rule' request.user person_or_user as can_view_photo %} {% if SITE_PREFERENCES.account__person_prefer_photo and person_or_user.photo and can_view_photo %}