{% if user_profile.is_superuser %}
User type: Superuser
{% elif user_profile.user_type == 0 %}
User type: User
{% elif user_profile.user_type == 1 %}
User type: Admin
{% elif user_profile.user_type == 2 %}
User type: ML Engineer
{% elif user_profile.user_type == 3 %}
User type: Accountant
{% else %}
User type: Unknown
{% endif %}
Tokens:
{{ token_count }}
{% if user_profile.user_type == 3 or user.is_superuser or user_profile.user_type == 1%}
Generate Financial Statement
{% comment %} REPLACE WITH LOGIC TO CHECK PROPER USER {% endcomment %}
{% endif %}
{% if user_profile.user_type == 2 or user.is_superuser or user_profile.user_type == 1%}
Upload Machine Learning Model
{% comment %} AI content {% endcomment %} {% endif%}
{% if user_profile.user_type == 2 or user.is_superuser %}
{% endif %}
General information
{{ user.email }}
{% else %}
No email address on record.
{% endif %}
{{ user.username }}
User History
Date |
Action |
Details |
{% for entry in user_data %}
{{entry.date}} |
{{entry.action}} |
{{entry.file}}
{% if entry.description %}
{% endif %}
|
{%endfor%}
{% if 1 %} {% comment %} REPLACE WITH LOGIC TO CHECK PROPER USER
{%endcomment %}
{% if user_profile.user_type == 2 or user.is_superuser%}
Application Logs
Date |
Action |
User ID |
status |
{% for entry in admin_data %}
{{entry.date}} |
{{entry.action}}
|
{{entry.user}} |
{{entry.status}} |
{% endfor %}
{% endif %}
{% if user.is_superuser or user_profile.user_type == 1 %}
User Management
Username |
User Type |
Actions |
{% for user_profile in all_user_profiles %}
{{ user_profile.user.username }} |
{% if user_profile.is_superuser %}
Superuser
{% elif user_profile.user_type == 1 %}
Admin
{% elif user_profile.user_type == 2 %}
ML Engineer
{% elif user_profile.user_type == 3 %}
Accountant
{% else %}
User
{% endif %}
|
|
{% endfor %}
{% endif %}
{% endif %} {% comment %} Admin page functionality end {% endcomment %}
{% endblock content %}