mirror of
https://github.com/itflow-org/itflow
synced 2026-11-21 20:07:24 +00:00
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:
@@ -213,7 +213,7 @@ function roleAdminBlocker(array $row) {
|
||||
return 'It is your own role - another admin can change it.';
|
||||
}
|
||||
$others = intval(mysqli_fetch_row(mysqli_query($mysqli, "SELECT COUNT(*) FROM users JOIN user_roles ON role_id = user_role_id
|
||||
WHERE user_type = 1 AND user_status = 1 AND user_archived_at IS NULL AND role_is_admin = 1 AND role_id <> " . intval($row['role_id'])))[0]);
|
||||
WHERE user_type = 1" . serviceAccountsOutSql() . " AND user_status = 1 AND user_archived_at IS NULL AND role_is_admin = 1 AND role_id <> " . intval($row['role_id'])))[0]);
|
||||
if ($others === 0 && intval($row['agents'])) {
|
||||
return 'Its agents are the only admins - nobody would be left to run Admin.';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user