add comment to revisit ngOnInit logic

This commit is contained in:
rr-bw 2024-09-10 14:55:24 -07:00
parent d76f4832e6
commit ff53feeed5
No known key found for this signature in database
GPG Key ID: 3FA13C3ADEE51D5D
1 changed files with 9 additions and 1 deletions

View File

@ -387,7 +387,8 @@ export class LoginComponentV2 implements OnInit, OnDestroy {
if (storedEmail) { if (storedEmail) {
this.formGroup.controls.email.setValue(storedEmail); this.formGroup.controls.email.setValue(storedEmail);
this.formGroup.controls.rememberEmail.setValue(true); // If there is a storedEmail, rememberEmail defaults to true // If there is a storedEmail, rememberEmail defaults to true
this.formGroup.controls.rememberEmail.setValue(true);
} }
} }
} }
@ -447,6 +448,13 @@ export class LoginComponentV2 implements OnInit, OnDestroy {
} }
}); });
/**
* TODO-rr-bw: Verify the following
*
* In the original web login component, this following code is called AFTER the base ngOnInit()
* runs. Verify that that previous order was not necessary, and that I can place all webOnInit()
* logic here BEFORE the defaultOnInit() call.
*/
// If there's an existing org invite, use it to get the password policies // If there's an existing org invite, use it to get the password policies
const orgPolicies = await this.loginService.getOrgPolicies(); const orgPolicies = await this.loginService.getOrgPolicies();