mirror of
https://github.com/itflow-org/itflow
synced 2026-11-11 07:01:16 +00:00
Roles stage 3: roles and agents in the API and Admin > API Keys rebuilt; new api/v1/roles/read.php where an admin key reads every role with its level per module and agent count, archived on request, and any other key reads only its own user's role, and new api/v1/technicians/read.php listing agents with their role under Support at Read; API role refusals now say what the call needs and what the key's user has, naming the module, level and role, and technicians/time.php needs Read instead of Modify; Admin > API Keys shows each key's agent and role, what it can open and for which clients, whether it works (works until, expires in N days, expired, or won't work with the reason when its agent is disabled, archived, has no role or is missing) and when it was last used, with search by key or agent name; New and Edit windows show the picked agent's access as they are picked and offer only active agents, Create before ticking the copied box opens the Key tab, new keys default to a year and must end after today, and an expired key can be renamed and stay expired; handlers moved to functions/api_keys.php with validation, escaped messages and audit entries naming the agent and what an edit changed, fixing empty names on revoke, delete and bulk delete, a backslash shown for apostrophes in names, the bulk count of keys ticked rather than deleted, keys created already expired and expired keys that could not be renamed; database 3.1.7 adds api_keys.api_key_last_used_at, set at most once a minute in the configured timezone; changelog updated
This commit is contained in:
@@ -21,6 +21,7 @@ require_once __DIR__ . '/functions/certificate.php';
|
||||
require_once __DIR__ . '/functions/network.php';
|
||||
require_once __DIR__ . '/functions/user.php';
|
||||
require_once __DIR__ . '/functions/roles.php';
|
||||
require_once __DIR__ . '/functions/api_keys.php';
|
||||
require_once __DIR__ . '/functions/asset_interface.php';
|
||||
require_once __DIR__ . '/functions/rack.php';
|
||||
require_once __DIR__ . '/functions/asset.php';
|
||||
|
||||
Reference in New Issue
Block a user