Roles - what each role lets its agents open: an admin role opens * everything, any other a level of each module. Each shows its access at a * glance and its agents (opening Users filtered to them). A role can be * changed, copied as the start of another, archived - kept for the agents * archived with it, not offered for new ones - or, while nobody has it, * deleted. The work is in functions/roles.php; the handlers are * admin/post/roles.php. */ require_once "includes/inc_all_admin.php"; $show_archived = isset($_GET['archived']); $search = trim((string) ($_GET['q'] ?? '')); $all_roles = roleRows(); $roles = []; $archived_count = 0; foreach ($all_roles as $role_id => $row) { $archived_count += $row['role_archived_at'] ? 1 : 0; if ((bool) $row['role_archived_at'] !== $show_archived) { continue; } if ($search !== '' && mb_stripos($row['role_name'], $search) === false && mb_stripos((string) $row['role_description'], $search) === false) { continue; } $roles[$role_id] = $row; } $agents = roleAgents(array_keys($roles), 5); // This page with some of its query changed - null drops a key $page_url = function (array $change = []) use ($show_archived, $search) { $query = array_merge(['q' => $search !== '' ? $search : null, 'archived' => $show_archived ? 1 : null], $change); return 'roles.php' . (($query = http_build_query(array_filter($query, function ($v) { return $v !== null; }))) ? "?$query" : ''); }; $csrf = $_SESSION['csrf_token']; ?>
A role sets what its agents can open - an admin role everything, including Admin; any other a level of each part of ITFlow. Which clients an agent sees is set on the agent, in Users.
| Role | Access | Agents | Action |
|---|---|---|---|
|
= $name ?>
Yours
= escapeHtml($row['role_description']) ?>
Archived = date('M j, Y', strtotime($row['role_archived_at'])) ?>
= roleAccessHtml($row) ?>
= $agents_html ?>
|
= roleAccessHtml($row) ?> | = $agents_html ?> |
|