IT Assets: remove manual user creation from settings
Users are sourced exclusively from the portal (via SSO auto-create or the Sync from Portal button). The Add User form and create_admin route are removed to prevent out-of-sync local-only accounts. A footer hint now links admins to the portal settings page.
This commit is contained in:
@@ -87,41 +87,14 @@
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!-- Add user form (admin only) -->
|
||||
<!-- Add user form removed — users are managed via the portal and synced automatically -->
|
||||
{% if current_user.is_admin %}
|
||||
<div class="card-footer bg-white">
|
||||
<h6 class="fw-semibold mb-3 mt-1"><i class="bi bi-person-plus me-1"></i>Add User</h6>
|
||||
<form method="POST" action="{{ url_for('settings.create_admin') }}">
|
||||
<div class="row g-2">
|
||||
<div class="col-md-3">
|
||||
<input type="text" name="username" class="form-control form-control-sm" placeholder="Username" required>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<input type="text" name="full_name" class="form-control form-control-sm" placeholder="Full Name">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<input type="email" name="email" class="form-control form-control-sm" placeholder="Email" required>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<input type="password" name="password" class="form-control form-control-sm" placeholder="Password" required minlength="8">
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<select name="role" class="form-select form-select-sm">
|
||||
<option value="readonly">readonly</option>
|
||||
<option value="editor">editor</option>
|
||||
<option value="admin">admin</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<button type="submit" class="btn btn-sm btn-primary">Add</button>
|
||||
</div>
|
||||
</div>
|
||||
<small class="text-muted mt-1 d-block">
|
||||
<strong>readonly</strong> – view only |
|
||||
<strong>editor</strong> – create & edit data |
|
||||
<strong>admin</strong> – full access including user management
|
||||
</small>
|
||||
</form>
|
||||
<small class="text-muted">
|
||||
<i class="bi bi-info-circle me-1"></i>
|
||||
Users are managed in the <a href="/" class="text-decoration-none">Portal</a>.
|
||||
Use <strong>Sync from Portal</strong> above to pull the latest access list.
|
||||
</small>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user