Restrict Train navbar link to admin users only

- Wrap Train link with admin role check in base.html
- Regular users can no longer see/access the Train page from navbar
- Maintains existing admin access to training functionality
parent 5c67bff8
......@@ -31,7 +31,9 @@
<nav class="nav">
<a href="/dashboard" {% if active_page == 'dashboard' %}class="active"{% endif %}>Dashboard</a>
<a href="/analyze" {% if active_page == 'analyze' %}class="active"{% endif %}>Analyze</a>
{% if user.get('role') == 'admin' %}
<a href="/train" {% if active_page == 'train' %}class="active"{% endif %}>Train</a>
{% endif %}
<a href="/history" {% if active_page == 'history' %}class="active"{% endif %}>History</a>
{% if user.get('role') == 'admin' %}
<a href="/api_tokens" {% if active_page == 'api_tokens' %}class="active"{% endif %}>API Tokens</a>
......
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