mirror of
https://github.com/itflow-org/itflow
synced 2026-12-02 17:18:59 +00:00
Modernize Administration > Users and the agent Account pages: new users list with Users/Admins/No MFA/Disabled/Archived views, role filter, status and MFA pills, remembered browsers, client access summary, last successful sign in with device and IP, seat badge, quick look modal, bulk role/require MFA/forget browsers/activate/disable, shared New/Edit user form with Details/Sign in/Client access tabs (icon prefixed inputs, picture preview, generated passwords, Only/Never client rules with search and set all), archive modal with ticket hand-over, restore requiring a new password, incident response limited to agents and forgetting remembered browsers, export role filter and MFA/last sign in/client access columns; Account pages reworked into Profile/Security/Preferences/Activity with current password required to change email, password or turn MFA off, inline SVG MFA QR code, remembered browser list with forget one/all, rows per page preference; adds functions/user.php shared helpers, validates email format and uniqueness, sets password hash and vault key from the exact typed password, purifies signatures, fixes Activity showing other agents' sign ins, removes dead user invite modal and user_model, and fixes the networks export link from All Clients with no filter
This commit is contained in:
@@ -1,21 +1,13 @@
|
||||
<?php
|
||||
|
||||
require_once '../../../includes/modal_header.php';
|
||||
|
||||
enforceAdminPermission();
|
||||
require_once '../../includes/modal_header.php';
|
||||
|
||||
// Pre-filled from the users page's current filters. Everything here is editable -
|
||||
// the export runs whatever this form posts, not whatever the page happened to show.
|
||||
$client_id = intval($_GET['client_id'] ?? 0);
|
||||
if ($client_id) {
|
||||
enforceClientAccess();
|
||||
}
|
||||
|
||||
// Search Filter
|
||||
$q_filter = $_GET['q'] ?? '';
|
||||
|
||||
// Archived Filter
|
||||
$archived_filter = (isset($_GET['archived']) && $_GET['archived'] == 1) ? 1 : 0;
|
||||
$roles = userRoles();
|
||||
$role_filter = isset($roles[intval($_GET['role'] ?? 0)]) ? intval($_GET['role']) : 0;
|
||||
|
||||
ob_start();
|
||||
|
||||
@@ -36,19 +28,32 @@ ob_start();
|
||||
<?php exportTabsFiltersOpen(); ?>
|
||||
|
||||
<div class="mb-3">
|
||||
<label>Search</label>
|
||||
<label class="form-label">Search</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-search"></i></span>
|
||||
<input type="text" class="form-control" name="q" value="<?= stripslashes(escapeHtml($q_filter)) ?>" placeholder="Name or email">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-search"></i></span>
|
||||
<input type="text" class="form-control" name="q" value="<?= escapeHtml($q_filter) ?>" placeholder="Name, email or role">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label>Archived</label>
|
||||
<label class="form-label">Role</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-archive"></i></span>
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-user-shield"></i></span>
|
||||
<select class="form-select select2" name="role">
|
||||
<option value="">- Any role -</option>
|
||||
<?php foreach ($roles as $role_id => $role) { ?>
|
||||
<option value="<?= $role_id ?>" <?= $role_filter === $role_id ? 'selected' : '' ?><?= selectOptionRole($role) ?>><?= escapeHtml($role['role_name']) ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Archived</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-archive"></i></span>
|
||||
<select class="form-select select2" name="archived">
|
||||
<option <?php if (!$archived_filter) { echo "selected"; } ?> value="0">Active only</option>
|
||||
<option <?php if (!$archived_filter) { echo "selected"; } ?> value="0">Not archived</option>
|
||||
<option <?php if ($archived_filter) { echo "selected"; } ?> value="1">Archived only</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user