feat(dev): environment ribbon and one-click dev login on the public site and auth pages
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
5f64ae57db
commit
b73c23bf55
8 files changed
+75
-4
No files matched your search
+2
-1
@@ -13,7 +13,8 @@ if (!is_file($_dev_shared)) { http_response_code(404); exit; } // submódulo s
|
||||
require_once $_dev_shared;
|
||||
|
||||
platform_dev_login_handle([
|
||||
'roles' => ['admin' => 'admin@mail.pt', 'sysadmin' => 'sysadmin@mail.pt'],
|
||||
'roles' => ['client' => 'client@mail.pt', 'staff' => 'staff@mail.pt',
|
||||
'admin' => 'admin@mail.pt', 'sysadmin' => 'sysadmin@mail.pt'],
|
||||
'bootstrap' => function () { global $pdo; require __DIR__ . '/config/db.php'; require_once __DIR__ . '/config/functions.php'; },
|
||||
'csrf_ok' => fn(): bool => is_string($_POST['_csrf'] ?? null) && is_string($_SESSION['csrf_token'] ?? null)
|
||||
&& $_SESSION['csrf_token'] !== '' && hash_equals($_SESSION['csrf_token'], $_POST['_csrf']),
|
||||
|
||||
Reference in new issue
Block a user