We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 57471d8 + 6027603 commit 30112ceCopy full SHA for 30112ce
alcs-frontend/src/app/features/provision/provision.component.ts
@@ -12,15 +12,16 @@ import { AuthenticationService } from '../../services/authentication/authenticat
12
export class ProvisionComponent implements OnInit, OnDestroy {
13
destroy = new Subject<void>();
14
15
- constructor(private authService: AuthenticationService, private router: Router) {}
+ constructor(
16
+ private authService: AuthenticationService,
17
+ private router: Router,
18
+ ) {}
19
20
ngOnInit(): void {
21
this.authService.$currentUser.pipe(takeUntil(this.destroy)).subscribe(async (user) => {
22
if (user) {
23
if (user.client_roles && user.client_roles.length > 0) {
24
await this.router.navigateByUrl(environment.homeUrl);
- } else {
- this.authService.clearTokens();
25
}
26
27
});
0 commit comments