feat(admin-auth): add dev-only QR bypass via ?devBypassAdmin=true
Some checks failed
Architecture Governance / architecture (push) Has been cancelled
Some checks failed
Architecture Governance / architecture (push) Has been cancelled
Fabricates a local admin session and activates it directly, skipping the Telegram QR flow, for local testing without a reachable session backend. Guarded by environment.production at runtime - no-ops in production builds even if this code ships.
This commit is contained in:
@@ -85,7 +85,13 @@ export class App implements OnInit {
|
||||
this.checkServerHealth();
|
||||
}
|
||||
|
||||
/** ?login=true / ?adminLogin=true open the respective login dialog for manual testing. No effect when absent. */
|
||||
/**
|
||||
* ?login=true / ?adminLogin=true open the respective login dialog for
|
||||
* manual testing. ?devBypassAdmin=true skips the QR flow entirely and
|
||||
* activates a fake local admin session - dev builds only, no effect (and
|
||||
* no-ops server-side too, see AdminAuthService.devBypassLogin) in
|
||||
* production. No effect when the params are absent.
|
||||
*/
|
||||
private openLoginDialogsFromTestModeQueryParams(): void {
|
||||
if (typeof window === 'undefined') {
|
||||
return;
|
||||
@@ -97,6 +103,9 @@ export class App implements OnInit {
|
||||
if (params.get('adminLogin') === 'true') {
|
||||
this.adminAuthService.requestLogin();
|
||||
}
|
||||
if (params.get('devBypassAdmin') === 'true') {
|
||||
this.adminAuthService.devBypassLogin();
|
||||
}
|
||||
}
|
||||
|
||||
private setupAutoUpdates(): void {
|
||||
|
||||
Reference in New Issue
Block a user