diff --git a/bitwarden_license/src/app/organizations/organizations-routing.module.ts b/bitwarden_license/src/app/organizations/organizations-routing.module.ts index 2c05f359..0bb5063b 100644 --- a/bitwarden_license/src/app/organizations/organizations-routing.module.ts +++ b/bitwarden_license/src/app/organizations/organizations-routing.module.ts @@ -1,7 +1,7 @@ import { NgModule } from "@angular/core"; import { RouterModule, Routes } from "@angular/router"; -import { AuthGuardService } from "jslib-angular/services/auth-guard.service"; +import { AuthGuard } from "jslib-angular/guards/auth.guard"; import { Permissions } from "jslib-common/enums/permissions"; import { OrganizationLayoutComponent } from "src/app/layouts/organization-layout.component"; @@ -15,7 +15,7 @@ const routes: Routes = [ { path: "organizations/:organizationId", component: OrganizationLayoutComponent, - canActivate: [AuthGuardService, OrganizationGuardService], + canActivate: [AuthGuard, OrganizationGuardService], children: [ { path: "manage", diff --git a/bitwarden_license/src/app/providers/providers-routing.module.ts b/bitwarden_license/src/app/providers/providers-routing.module.ts index ffe9d0a6..21b67319 100644 --- a/bitwarden_license/src/app/providers/providers-routing.module.ts +++ b/bitwarden_license/src/app/providers/providers-routing.module.ts @@ -1,7 +1,7 @@ import { NgModule } from "@angular/core"; import { RouterModule, Routes } from "@angular/router"; -import { AuthGuardService } from "jslib-angular/services/auth-guard.service"; +import { AuthGuard } from "jslib-angular/guards/auth.guard"; import { Permissions } from "jslib-common/enums/permissions"; import { FrontendLayoutComponent } from "src/app/layouts/frontend-layout.component"; @@ -24,7 +24,7 @@ import { SetupComponent } from "./setup/setup.component"; const routes: Routes = [ { path: "", - canActivate: [AuthGuardService], + canActivate: [AuthGuard], component: ProvidersComponent, }, { @@ -45,7 +45,7 @@ const routes: Routes = [ }, { path: "", - canActivate: [AuthGuardService], + canActivate: [AuthGuard], children: [ { path: "setup", diff --git a/jslib b/jslib index 9950fb42..65efc948 160000 --- a/jslib +++ b/jslib @@ -1 +1 @@ -Subproject commit 9950fb42a15bad434a4b404419ff4a87af67a27b +Subproject commit 65efc948adebdca380aa949b200b3ea184cb8278 diff --git a/src/app/oss-routing.module.ts b/src/app/oss-routing.module.ts index 911b93b2..aa70a1a0 100644 --- a/src/app/oss-routing.module.ts +++ b/src/app/oss-routing.module.ts @@ -1,9 +1,9 @@ import { NgModule } from "@angular/core"; import { RouterModule, Routes } from "@angular/router"; -import { AuthGuardService } from "jslib-angular/services/auth-guard.service"; -import { LockGuardService } from "jslib-angular/services/lock-guard.service"; -import { UnauthGuardService } from "jslib-angular/services/unauth-guard.service"; +import { AuthGuard } from "jslib-angular/guards/auth.guard"; +import { LockGuard } from "jslib-angular/guards/lock.guard"; +import { UnauthGuard } from "jslib-angular/guards/unauth.guard"; import { Permissions } from "jslib-common/enums/permissions"; import { AcceptEmergencyComponent } from "./accounts/accept-emergency.component"; @@ -80,18 +80,18 @@ const routes: Routes = [ path: "", component: FrontendLayoutComponent, children: [ - { path: "", pathMatch: "full", component: LoginComponent, canActivate: [UnauthGuardService] }, - { path: "2fa", component: TwoFactorComponent, canActivate: [UnauthGuardService] }, + { path: "", pathMatch: "full", component: LoginComponent, canActivate: [UnauthGuard] }, + { path: "2fa", component: TwoFactorComponent, canActivate: [UnauthGuard] }, { path: "register", component: RegisterComponent, - canActivate: [UnauthGuardService], + canActivate: [UnauthGuard], data: { titleId: "createAccount" }, }, { path: "sso", component: SsoComponent, - canActivate: [UnauthGuardService], + canActivate: [UnauthGuard], data: { titleId: "enterpriseSingleSignOn" }, }, { @@ -102,13 +102,13 @@ const routes: Routes = [ { path: "hint", component: HintComponent, - canActivate: [UnauthGuardService], + canActivate: [UnauthGuard], data: { titleId: "passwordHint" }, }, { path: "lock", component: LockComponent, - canActivate: [LockGuardService], + canActivate: [LockGuard], }, { path: "verify-email", component: VerifyEmailTokenComponent }, { @@ -125,19 +125,19 @@ const routes: Routes = [ { path: "recover-2fa", component: RecoverTwoFactorComponent, - canActivate: [UnauthGuardService], + canActivate: [UnauthGuard], data: { titleId: "recoverAccountTwoStep" }, }, { path: "recover-delete", component: RecoverDeleteComponent, - canActivate: [UnauthGuardService], + canActivate: [UnauthGuard], data: { titleId: "deleteAccount" }, }, { path: "verify-recover-delete", component: VerifyRecoverDeleteComponent, - canActivate: [UnauthGuardService], + canActivate: [UnauthGuard], data: { titleId: "deleteAccount" }, }, { @@ -148,19 +148,19 @@ const routes: Routes = [ { path: "update-temp-password", component: UpdateTempPasswordComponent, - canActivate: [AuthGuardService], + canActivate: [AuthGuard], data: { titleId: "updateTempPassword" }, }, { path: "update-password", component: UpdatePasswordComponent, - canActivate: [AuthGuardService], + canActivate: [AuthGuard], data: { titleId: "updatePassword" }, }, { path: "remove-password", component: RemovePasswordComponent, - canActivate: [AuthGuardService], + canActivate: [AuthGuard], data: { titleId: "removeMasterPassword" }, }, ], @@ -168,7 +168,7 @@ const routes: Routes = [ { path: "", component: UserLayoutComponent, - canActivate: [AuthGuardService], + canActivate: [AuthGuard], children: [ { path: "vault", component: VaultComponent, data: { titleId: "myVault" } }, { path: "sends", component: SendComponent, data: { title: "Send" } }, @@ -234,7 +234,7 @@ const routes: Routes = [ { path: "tools", component: ToolsComponent, - canActivate: [AuthGuardService], + canActivate: [AuthGuard], children: [ { path: "", pathMatch: "full", redirectTo: "generator" }, { path: "import", component: ImportComponent, data: { titleId: "importData" } }, @@ -282,7 +282,7 @@ const routes: Routes = [ { path: "organizations/:organizationId", component: OrganizationLayoutComponent, - canActivate: [AuthGuardService, OrganizationGuardService], + canActivate: [AuthGuard, OrganizationGuardService], children: [ { path: "", pathMatch: "full", redirectTo: "vault" }, { path: "vault", component: OrgVaultComponent, data: { titleId: "vault" } }, diff --git a/src/app/oss.module.ts b/src/app/oss.module.ts index 90596adf..ab72608f 100644 --- a/src/app/oss.module.ts +++ b/src/app/oss.module.ts @@ -57,7 +57,6 @@ import { BadgeModule, ButtonModule, CalloutModule } from "@bitwarden/components" import { InfiniteScrollModule } from "ngx-infinite-scroll"; import { ToastrModule } from "ngx-toastr"; -import { NotPremiumDirective } from "jslib-angular/directives/not-premium.directive"; import { JslibModule } from "jslib-angular/jslib.module"; import { AcceptEmergencyComponent } from "./accounts/accept-emergency.component"; @@ -336,7 +335,6 @@ registerLocaleData(localeZhTw, "zh-TW"); MasterPasswordPolicyComponent, NavbarComponent, NestedCheckboxComponent, - NotPremiumDirective, OrgAccountComponent, OrgAddEditComponent, OrganizationBillingComponent,