{% extends 'base.html' %} {% block title %}Settings — Enterprise Digital Platform{% endblock %} {% block content %}

Settings

Portal Users

+ New User
{% for app in registered_apps %} {% endfor %} {% for user in users %} {# Per-app role dropdown — auto-submits on change #} {% for app in registered_apps %} {% set cur_access = user.app_accesses.filter_by(app_name=app['id']).first() %} {% set cur_role = cur_access.app_role if cur_access and cur_access.is_active and cur_access.app_role else ('active' if (cur_access and cur_access.is_active) else 'none') %} {% endfor %} {% endfor %}
Username Email Role Last Login {{ app.icon }} {{ app.name }}
access / role
Actions
{{ user.username }} {{ user.email }} {% if user.is_admin %} admin {% else %} user {% endif %} {{ user.last_login.strftime('%Y-%m-%d %H:%M') if user.last_login else '—' }}
{# Carry all other apps' current values as hidden inputs #} {% for other in registered_apps %} {% if other['id'] != app['id'] %} {% set oa = user.app_accesses.filter_by(app_name=other['id']).first() %} {% if oa and oa.is_active %} {% else %} {% endif %} {% endif %} {% endfor %}
{% if user.id != current_user.id %}
{% else %} {% endif %}
{% endblock %}