fix: use can_access_admin_panel() for payment link visibility check
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions

Role field may be string not enum in template context.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Maciej Pienczyn 2026-04-08 11:27:55 +02:00
parent 6612a336b2
commit 6067492b1d

View File

@ -652,7 +652,7 @@
</div>
{% endif %}
{% if event.is_paid and current_user.role and current_user.role.value >= 50 %}
{% if event.is_paid and current_user.is_authenticated and current_user.can_access_admin_panel() %}
<div style="margin-top: var(--spacing-md);">
<a href="{{ url_for('admin.admin_event_payments', event_id=event.id) }}" class="btn btn-outline" style="font-size: 0.9em;">
<svg width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24" style="vertical-align: -3px; margin-right: 4px;">