1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-14 07:13:32 +00:00

[BEEEP] Allow linking to ciphers (#760)

This commit is contained in:
Oscar Hinton
2022-04-20 11:15:58 +02:00
committed by GitHub
parent ad37de9373
commit f6e3481fe9
5 changed files with 5 additions and 25 deletions

View File

@@ -61,7 +61,6 @@ export class UpdatePasswordComponent extends BaseChangePasswordComponent {
async cancel() {
await this.stateService.setOrganizationInvitation(null);
await this.stateService.setLoginRedirect(null);
this.router.navigate(["/vault"]);
}

View File

@@ -19,7 +19,7 @@ export class AuthGuardService implements CanActivate {
async canActivate(route: ActivatedRouteSnapshot, routerState: RouterStateSnapshot) {
const isAuthed = await this.stateService.getIsAuthenticated();
if (!isAuthed) {
this.messagingService.send("authBlocked");
this.messagingService.send("authBlocked", { url: routerState.url });
return false;
}
@@ -28,16 +28,14 @@ export class AuthGuardService implements CanActivate {
if (routerState != null) {
this.messagingService.send("lockedUrl", { url: routerState.url });
}
this.router.navigate(["lock"], { queryParams: { promptBiometric: true } });
return false;
return this.router.createUrlTree(["lock"], { queryParams: { promptBiometric: true } });
}
if (
!routerState.url.includes("remove-password") &&
(await this.keyConnectorService.getConvertAccountRequired())
) {
this.router.navigate(["/remove-password"]);
return false;
return this.router.createUrlTree(["/remove-password"]);
}
return true;

View File

@@ -18,11 +18,9 @@ export class UnauthGuardService implements CanActivate {
if (isAuthed) {
const locked = await this.vaultTimeoutService.isLocked();
if (locked) {
this.router.navigate(["lock"]);
} else {
this.router.navigate([this.homepage]);
return this.router.createUrlTree(["lock"]);
}
return false;
return this.router.createUrlTree([this.homepage]);
}
return true;
}