{% extends "base.html" %} {% block title %}Issue #{{ issue.id }}{% endblock %} {% block extra_css %} {% endblock %} {% block content %} {% set can_edit = current_user.role in ['admin','director','auditor'] or issue.assigned_to == current_user.id %} {# The filtered list URL this page was opened from (phase: filter preservation). Threaded into every action so an update or delete returns to the same filtered page, and used by the Back button. #} {% set back_url = request.args.get('next') or url_for('issues.index') %} {# Is the viewer OUR staff? Drives the internal-only chrome on this page: the "comments are visible to everyone" warning and the per-comment "Customer visible" / "Staff only" badges. Both are instructions about how WE work and must never reach a customer account. Written as an explicit ALLOWLIST of our own roles, deliberately: * It FAILS CLOSED. The obvious form, `not current_user.is_customer_account`, fails OPEN — if the attribute is missing for any reason (a process still running an older models/user.py after a template-only reload, say) Jinja yields Undefined, `not Undefined` is true, and the internal text is shown to exactly the people it must be hidden from. An allowlist of literal role strings can only ever be true for a role we listed. * `external_inspector` is absent ON PURPOSE. This is NOT the rule-87 case: rule 87 is about capability/scoping, where a Customer Inspector must behave exactly like our own inspector. Here the question is "does this person work for us?", which is the one place the two genuinely differ. Do not "fix" this by adding external_inspector to the list. #} {% set viewer_is_our_staff = current_user.role in ['admin', 'director', 'project_manager', 'auditor', 'inspector'] %}
{{ issue.description }}
{% if issue.photo_path or issue.mobile_photo_paths %}{{ issue.result_notes }}
{% endif %} {% if issue.result_photos %} {% endif %} {% endif %} {# ── Verification panel ── #} {% if issue.verified_at %}No linked issues. {% if can_manage_links %} Use Link an Issue to point at a duplicate or a related issue. {% endif %}
{% endif %}{{ c.body }}
No comments yet.
Add Comment
Add Comment
To add comments, click on the Follow button
Only assigned staff can add comments.