CluPilotCloud/tests/Feature/Admin
nexxo 90131f088a Add a raw .env editor to the Integrations page, with a net under it
Everything the console has no field for is still real — MAIL_*, DB_*,
APP_KEY, whichever key nobody has built a form for yet — and without a way to
touch it from here, the operator needs a shell and the console page misses
its own point. EnvFileEditor is the net, not just the warning:

1. Validates before writing. A line that is neither blank, nor a comment, nor
   KEY=value is rejected outright, and an empty file (syntactically "valid" by
   that rule, but not survivable) is refused too. write() never touches the
   file before checking the new content.
2. Backs up before every write that actually happens — a timestamped copy
   beside .env, before the new content lands. Never pruned automatically; the
   page says so, next to where it says where they land.
3. Names the keys a mistake here can lock an operator out with — APP_KEY,
   DB_*, REDIS_*, SESSION_* — rather than a blanket warning nobody reads.
4. Gated by secrets.manage and the same confirmed password the vault entries
   use — this is the one place on the page that can reach every credential
   the vault otherwise keeps write-only.
5. Says plainly what saving does not do: queue, queue-provisioning, scheduler
   and reverb only read .env at their own startup, and names the restart
   command plus config:clear.
6. Marks which .env keys SecretVault currently overrides, so editing a line
   that a stored vault value already shadows does not look broken.

Two issues surfaced by Codex review and fixed before this commit: the raw
file content stayed in the Livewire component snapshot after the password
confirmation window expired on its own (not only on an explicit re-lock), and
the first save on an installation with no .env yet failed trying to back up a
file that was never there.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-29 01:51:27 +02:00
..
AdminConsoleTest.php Send a guest bounced off the console to the console's own sign-in 2026-07-28 13:32:05 +02:00
AdminHostRestrictionTest.php Move the console's identity out of the customer table 2026-07-28 10:31:43 +02:00
AdminSettingsTest.php Check users directly for the reverse operator-identity collision, not just customers 2026-07-28 15:36:29 +02:00
BroadcastAuthTest.php Authorize the console's live feed on the operator guard, not the default 2026-07-28 13:31:50 +02:00
ConsoleHostSeparationTest.php Match the logout exemption through AdminArea, not a bare route check 2026-07-28 15:27:06 +02:00
ConsoleNetworkTest.php Move the console's identity out of the customer table 2026-07-28 10:31:43 +02:00
ConsoleReportsRealDataTest.php Move the console's identity out of the customer table 2026-07-28 10:31:43 +02:00
CustomerRevenueTest.php Move the console's identity out of the customer table 2026-07-28 10:31:43 +02:00
DatacenterTest.php Let a datacenter code be corrected while nothing depends on it, and say which building 2026-07-28 22:25:21 +02:00
EnvFileEditorTest.php Add a raw .env editor to the Integrations page, with a net under it 2026-07-29 01:51:27 +02:00
HostManagementTest.php Send a guest bounced off the console to the console's own sign-in 2026-07-28 13:32:05 +02:00
HostVpnStateTest.php Read VPN host state from the synced peer table, not a live hub call 2026-07-29 00:18:21 +02:00
InstanceAdminAccessTest.php Move the console's identity out of the customer table 2026-07-28 10:31:43 +02:00
IntegrationsPageTest.php Add a raw .env editor to the Integrations page, with a net under it 2026-07-29 01:51:27 +02:00
MaintenanceTest.php Move the console's identity out of the customer table 2026-07-28 10:31:43 +02:00
OperatorLogoutTest.php Stop the console logout from destroying a shared portal session 2026-07-28 13:58:42 +02:00
OperatorModelTest.php Give the people who run CluPilot a table of their own 2026-07-28 09:20:54 +02:00
OperatorTwoFactorEnrollmentTest.php Give the two-factor page a way back, and a shape 2026-07-28 22:25:42 +02:00
OperatorTwoFactorPolicyTest.php Move operator two-factor enrolment off admin.settings onto its own page 2026-07-28 15:11:20 +02:00
PasswordConfirmationGuardTest.php Merge credentials and infrastructure into one Integrations page 2026-07-29 01:49:39 +02:00
PlanAdminTest.php Move the console's identity out of the customer table 2026-07-28 10:31:43 +02:00
ProvisioningActionsTest.php Move the console's identity out of the customer table 2026-07-28 10:31:43 +02:00
RbacMoveTest.php Preflight every customer conflict before this migration mutates anything 2026-07-28 16:07:11 +02:00
RbacTest.php Move the console's identity out of the customer table 2026-07-28 10:31:43 +02:00
SecretCipherTest.php Make isUsable() apply the same 32-byte rule encrypter() does 2026-07-28 05:09:09 +02:00
SecretVaultTest.php Read the DNS and monitoring tokens from the vault, not config 2026-07-29 00:34:54 +02:00
UpdateButtonTest.php Update only to a released version, never to whatever landed on main 2026-07-28 22:32:44 +02:00
VpnTest.php Replace native confirm() dialogs with the app's own modal pattern 2026-07-28 19:34:27 +02:00