Skip to content

Commit 30112ce

Browse files
authored
Merge pull request #2207 from bcgov/bugfix/ALCS-2367
Fix provision page redirecting to home page for user without role
2 parents 57471d8 + 6027603 commit 30112ce

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

alcs-frontend/src/app/features/provision/provision.component.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,16 @@ import { AuthenticationService } from '../../services/authentication/authenticat
1212
export class ProvisionComponent implements OnInit, OnDestroy {
1313
destroy = new Subject<void>();
1414

15-
constructor(private authService: AuthenticationService, private router: Router) {}
15+
constructor(
16+
private authService: AuthenticationService,
17+
private router: Router,
18+
) {}
1619

1720
ngOnInit(): void {
1821
this.authService.$currentUser.pipe(takeUntil(this.destroy)).subscribe(async (user) => {
1922
if (user) {
2023
if (user.client_roles && user.client_roles.length > 0) {
2124
await this.router.navigateByUrl(environment.homeUrl);
22-
} else {
23-
this.authService.clearTokens();
2425
}
2526
}
2627
});

0 commit comments

Comments
 (0)