Users: an API or service account keeps its role for API keys but is left out of agent lists, pickers, notifications and admin alerts, cannot sign in, and has its own API accounts tab on Admin Users; database 3.8.1 adds users.user_service_account; 26.11.9 changelog entries

This commit is contained in:
johnnyq
2026-11-17 19:24:04 -05:00
parent 46a2dfe96c
commit 1c4c8be8de
53 changed files with 201 additions and 49 deletions

View File

@@ -171,6 +171,24 @@ $value = function ($key) use ($form) {
<?php } ?>
</div>
</div>
<?php if (serviceAccountsReady()) {
$form_service = $form_user_id && serviceAccountIs($form_user_id); ?>
<!-- A login only for API keys to act as (functions/service_account.php) -->
<div class="col-12" data-user-service-account>
<input type="hidden" name="service_account_present" value="1">
<div class="border rounded p-3">
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" role="switch" name="service_account" value="1" id="<?= $form_id ?>ServiceAccount" <?= $form_service ? 'checked' : '' ?>>
<label class="form-check-label fw-semibold" for="<?= $form_id ?>ServiceAccount"><i class="fas fa-fw fa-plug text-body-secondary me-1"></i>API / service account</label>
<div class="form-text mt-0">
For a login that API keys act as, for an integration. It keeps its role, so its keys work, but it's left out of the calendar, every assign picker, the reports and the other agent lists, gets no notifications, and can't sign in to ITFlow.
<?= $is_new ? 'Set a password for it - it isn\'t invited.' : '' ?>
</div>
</div>
</div>
</div>
<?php } ?>
</div>
</div>