Fix template variable access for user role check

- Change current_user.role to current_user.get('role') to match template conventions
- User object is passed as dictionary, not object with attributes
parent 76bd3f23
...@@ -379,7 +379,7 @@ ...@@ -379,7 +379,7 @@
<h2><i class="fas fa-tasks"></i> Active Jobs</h2> <h2><i class="fas fa-tasks"></i> Active Jobs</h2>
<p style="margin: 0.5rem 0 0 0; color: #64748b; font-size: 0.9rem;">View and manage your queued, processing, and recently cancelled jobs</p> <p style="margin: 0.5rem 0 0 0; color: #64748b; font-size: 0.9rem;">View and manage your queued, processing, and recently cancelled jobs</p>
</div> </div>
{% if current_user.role == 'admin' and all_users %} {% if current_user.get('role') == 'admin' and all_users %}
<div style="display: flex; align-items: center; gap: 0.5rem;"> <div style="display: flex; align-items: center; gap: 0.5rem;">
<label for="userSelector" style="font-size: 0.9rem; color: #374151; font-weight: 500;">View jobs for:</label> <label for="userSelector" style="font-size: 0.9rem; color: #374151; font-weight: 500;">View jobs for:</label>
<select id="userSelector" style="border: 1px solid #d1d5db; border-radius: 6px; padding: 0.375rem 0.75rem; font-size: 0.875rem; background: white;"> <select id="userSelector" style="border: 1px solid #d1d5db; border-radius: 6px; padding: 0.375rem 0.75rem; font-size: 0.875rem; background: white;">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment