Role management, login logic, and debug improvements. MariaDB login now uses correct syntax.
This commit is contained in:
43
py_app/app/templates/edit_access_roles.html
Normal file
43
py_app/app/templates/edit_access_roles.html
Normal file
@@ -0,0 +1,43 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}Edit Access Roles{% endblock %}
|
||||
{% block content %}
|
||||
<div class="card" style="max-width: 700px; margin: 32px auto;">
|
||||
<h3>Role Access Management</h3>
|
||||
<p>Configure which roles can view or execute functions on each app page and feature.</p>
|
||||
<table class="scan-table" style="width:100%;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Role</th>
|
||||
<th>Access Level</th>
|
||||
<th>Editable</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>superadmin</td>
|
||||
<td>Full access to all pages and functions</td>
|
||||
<td><span style="color:#888;">Not editable</span></td>
|
||||
</tr>
|
||||
{% for role in roles %}
|
||||
{% if role != 'superadmin' %}
|
||||
<tr>
|
||||
<td>{{ role }}</td>
|
||||
<td>
|
||||
<form method="POST" action="{{ url_for('main.update_role_access', role=role) }}">
|
||||
<select name="access_level">
|
||||
<option value="view">View Only</option>
|
||||
<option value="execute">View & Execute</option>
|
||||
<option value="none">No Access</option>
|
||||
</select>
|
||||
<button type="submit" class="btn">Save</button>
|
||||
</form>
|
||||
</td>
|
||||
<td>Editable</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<p style="margin-top:16px; color:#888;">Only superadmin users can view and manage role access.</p>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user