[BEEEP] Allow linking to ciphers (#760)
This commit is contained in:
parent
ad37de9373
commit
f6e3481fe9
|
@ -61,7 +61,6 @@ export class UpdatePasswordComponent extends BaseChangePasswordComponent {
|
||||||
|
|
||||||
async cancel() {
|
async cancel() {
|
||||||
await this.stateService.setOrganizationInvitation(null);
|
await this.stateService.setOrganizationInvitation(null);
|
||||||
await this.stateService.setLoginRedirect(null);
|
|
||||||
this.router.navigate(["/vault"]);
|
this.router.navigate(["/vault"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ export class AuthGuardService implements CanActivate {
|
||||||
async canActivate(route: ActivatedRouteSnapshot, routerState: RouterStateSnapshot) {
|
async canActivate(route: ActivatedRouteSnapshot, routerState: RouterStateSnapshot) {
|
||||||
const isAuthed = await this.stateService.getIsAuthenticated();
|
const isAuthed = await this.stateService.getIsAuthenticated();
|
||||||
if (!isAuthed) {
|
if (!isAuthed) {
|
||||||
this.messagingService.send("authBlocked");
|
this.messagingService.send("authBlocked", { url: routerState.url });
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,16 +28,14 @@ export class AuthGuardService implements CanActivate {
|
||||||
if (routerState != null) {
|
if (routerState != null) {
|
||||||
this.messagingService.send("lockedUrl", { url: routerState.url });
|
this.messagingService.send("lockedUrl", { url: routerState.url });
|
||||||
}
|
}
|
||||||
this.router.navigate(["lock"], { queryParams: { promptBiometric: true } });
|
return this.router.createUrlTree(["lock"], { queryParams: { promptBiometric: true } });
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
!routerState.url.includes("remove-password") &&
|
!routerState.url.includes("remove-password") &&
|
||||||
(await this.keyConnectorService.getConvertAccountRequired())
|
(await this.keyConnectorService.getConvertAccountRequired())
|
||||||
) {
|
) {
|
||||||
this.router.navigate(["/remove-password"]);
|
return this.router.createUrlTree(["/remove-password"]);
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -18,11 +18,9 @@ export class UnauthGuardService implements CanActivate {
|
||||||
if (isAuthed) {
|
if (isAuthed) {
|
||||||
const locked = await this.vaultTimeoutService.isLocked();
|
const locked = await this.vaultTimeoutService.isLocked();
|
||||||
if (locked) {
|
if (locked) {
|
||||||
this.router.navigate(["lock"]);
|
return this.router.createUrlTree(["lock"]);
|
||||||
} else {
|
|
||||||
this.router.navigate([this.homepage]);
|
|
||||||
}
|
}
|
||||||
return false;
|
return this.router.createUrlTree([this.homepage]);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -242,8 +242,6 @@ export abstract class StateService<T extends Account = Account> {
|
||||||
setLocalData: (value: string, options?: StorageOptions) => Promise<void>;
|
setLocalData: (value: string, options?: StorageOptions) => Promise<void>;
|
||||||
getLocale: (options?: StorageOptions) => Promise<string>;
|
getLocale: (options?: StorageOptions) => Promise<string>;
|
||||||
setLocale: (value: string, options?: StorageOptions) => Promise<void>;
|
setLocale: (value: string, options?: StorageOptions) => Promise<void>;
|
||||||
getLoginRedirect: (options?: StorageOptions) => Promise<any>;
|
|
||||||
setLoginRedirect: (value: any, options?: StorageOptions) => Promise<void>;
|
|
||||||
getMainWindowSize: (options?: StorageOptions) => Promise<number>;
|
getMainWindowSize: (options?: StorageOptions) => Promise<number>;
|
||||||
setMainWindowSize: (value: number, options?: StorageOptions) => Promise<void>;
|
setMainWindowSize: (value: number, options?: StorageOptions) => Promise<void>;
|
||||||
getMinimizeOnCopyToClipboard: (options?: StorageOptions) => Promise<boolean>;
|
getMinimizeOnCopyToClipboard: (options?: StorageOptions) => Promise<boolean>;
|
||||||
|
|
|
@ -1633,19 +1633,6 @@ export class StateService<
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
async getLoginRedirect(options?: StorageOptions): Promise<any> {
|
|
||||||
return (await this.getGlobals(this.reconcileOptions(options, this.defaultInMemoryOptions)))
|
|
||||||
?.loginRedirect;
|
|
||||||
}
|
|
||||||
|
|
||||||
async setLoginRedirect(value: any, options?: StorageOptions): Promise<void> {
|
|
||||||
const globals = await this.getGlobals(
|
|
||||||
this.reconcileOptions(options, this.defaultInMemoryOptions)
|
|
||||||
);
|
|
||||||
globals.loginRedirect = value;
|
|
||||||
await this.saveGlobals(globals, this.reconcileOptions(options, this.defaultInMemoryOptions));
|
|
||||||
}
|
|
||||||
|
|
||||||
async getMainWindowSize(options?: StorageOptions): Promise<number> {
|
async getMainWindowSize(options?: StorageOptions): Promise<number> {
|
||||||
return (await this.getGlobals(this.reconcileOptions(options, this.defaultInMemoryOptions)))
|
return (await this.getGlobals(this.reconcileOptions(options, this.defaultInMemoryOptions)))
|
||||||
?.mainWindowSize;
|
?.mainWindowSize;
|
||||||
|
|
Loading…
Reference in New Issue