2 Commits

Author SHA1 Message Date
johnnyq
a5a43e37ac Audit logs stage 3: failed sign-ins say why and are logged against the account they were for - wrong password, no account with that email, disabled, archived or invited account, client archived, portal turned off, a wrong MFA or two-step code after the right password - with failed Microsoft 365 portal sign-ins logged too and marked Their account in the audit log; the IP lockout counts portal failures as well; the first sign-in from an IP address is badged New IP in the audit lists and quick look; new Admin > Sign-ins under Access with People and IP addresses views, search, date filter, sortable columns and paging; admins get a notification and an email on a run of failed sign-ins or turned-away API calls from one address or against one account, set in Settings > Security (10 to start, 5, 20, 50 or never), each in the audit log Security view and in Mail > Previews; API calls counted per key, day and endpoint, with a 30-day calls column and last IP on API Keys and a usage window, expired-key calls logged against the key, and usage deleted with the key and after the log retention; database 3.3.2 drops the unused auth_logs table and adds settings.config_login_alert_failures and api_key_usage; new functions/sign_in.php, admin/sign_ins.php and admin/modals/api/api_key_usage.php; the license template page no longer warns when view is missing 2026-10-19 00:56:52 -04:00
johnnyq
f43d4a9127 Audit logs stage 2: record history and a client Audit Log for agents, scoped to their role; auditLogKinds() gives each kind the module that shows it, with new auditLogRoleSql() (everything for an admin, otherwise the kinds the role reads and never Denied), auditLogHistory(), auditLogHistoryUrl(), auditLogHistoryHtml(), auditLogHistoryCard() and auditLogHistorySection(); a History tab on contacts, assets, networks and projects, a History card on racks, documents and the ticket, project, document and license template pages, and a folded History on the file, expense, recurring expense and trip quick looks, each newest first with who, when and the IP for an admin, the latest 50 with how many more and a link to all of them; vendors, locations, licenses, services and products use the shared list, and vendorHistory(), locationHistory(), softwareHistory(), serviceHistory() and productHistory() are removed; new agent/audit_log.php in the client nav after Calendar, with search, who, type, action, one record by name, dates, sortable columns, paging and Changes, Deletions, Sign-ins and Data out views, plus the quick look and a link to Admin > Audit Logs for admins; the client overview's Recent activity is role-scoped and links there for everyone; Your account > Activity rebuilt as the same list over the agent's own entries; the document versions card is now called Versions; the admin audit log quick look links to itself absolutely so it opens from agent pages 2026-10-19 00:13:28 -04:00