diff options
Diffstat (limited to 'src/app/guards')
-rw-r--r-- | src/app/guards/auth.guard.ts | 4 | ||||
-rw-r--r-- | src/app/guards/edit-user.can-activate.guard.ts | 4 | ||||
-rw-r--r-- | src/app/guards/has-permissions.guard.ts | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/app/guards/auth.guard.ts b/src/app/guards/auth.guard.ts index 54ede0f..645819c 100644 --- a/src/app/guards/auth.guard.ts +++ b/src/app/guards/auth.guard.ts @@ -18,7 +18,7 @@ import { Injectable } from '@angular/core'; -import { CanActivate, UrlTree } from '@angular/router'; +import { UrlTree } from '@angular/router'; import { Observable } from 'rxjs'; import { AuthService } from '../services/auth.service'; @@ -28,7 +28,7 @@ import { AuthService } from '../services/auth.service'; @Injectable({ providedIn: 'root', }) -export class AuthGuard implements CanActivate { +export class AuthGuard { roles: string = ''; constructor(private authService: AuthService) {} diff --git a/src/app/guards/edit-user.can-activate.guard.ts b/src/app/guards/edit-user.can-activate.guard.ts index 81fc36e..29c927a 100644 --- a/src/app/guards/edit-user.can-activate.guard.ts +++ b/src/app/guards/edit-user.can-activate.guard.ts @@ -18,7 +18,7 @@ import { Injectable } from '@angular/core'; -import { ActivatedRouteSnapshot, CanActivate, Router } from '@angular/router'; +import { ActivatedRouteSnapshot, Router } from '@angular/router'; import { Observable, of } from 'rxjs'; import { UsersService } from '../../../openapi/output'; import { catchError, map } from 'rxjs/operators'; @@ -26,7 +26,7 @@ import { TranslateService } from '@ngx-translate/core'; @Injectable({ providedIn: 'root', }) -export class EditUserCanActivateGuard implements CanActivate { +export class EditUserCanActivateGuard { constructor(private usersService: UsersService, private router: Router, private translateService: TranslateService) {} canActivate(route: ActivatedRouteSnapshot): Observable<boolean> { const userId = route.paramMap.get('userId'); diff --git a/src/app/guards/has-permissions.guard.ts b/src/app/guards/has-permissions.guard.ts index cc04673..1731a33 100644 --- a/src/app/guards/has-permissions.guard.ts +++ b/src/app/guards/has-permissions.guard.ts @@ -18,7 +18,7 @@ import { Inject, Injectable } from '@angular/core'; -import { ActivatedRouteSnapshot, CanActivate, Router, UrlTree } from '@angular/router'; +import { ActivatedRouteSnapshot, Router, UrlTree } from '@angular/router'; import { Observable } from 'rxjs'; import { HttpClient } from '@angular/common/http'; import { ACL_CONFIG, AclConfig } from '../modules/auth/injection-tokens'; @@ -29,7 +29,7 @@ import { map } from 'rxjs/operators'; @Injectable({ providedIn: 'root', }) -export class HasPermissionsGuard implements CanActivate { +export class HasPermissionsGuard { constructor( private readonly authService: AuthService, private readonly httpClient: HttpClient, |