Skip to content

Commit

Permalink
fix: fixed unauthorized page
Browse files Browse the repository at this point in the history
  • Loading branch information
diogonapoles committed Jan 3, 2024
1 parent 566df69 commit 3a18951
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions spa/src/app/services/roleAuthGuard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ import { RolesEnum } from '../services/user.service'
providedIn: 'root',
})
export class RoleAuthGuard implements CanActivate {
constructor(private userService: UserService, private router: Router) {}
constructor(
private userService: UserService,
private router: Router,
) {}

canActivate(
route: ActivatedRouteSnapshot,
Expand All @@ -26,7 +29,7 @@ export class RoleAuthGuard implements CanActivate {
return true
} else {
alert('Not authorized to perform this action')
this.router.navigate(['/unauthorized'])
// this.router.navigate(['/unauthorized'])
return false
}
}
Expand Down

0 comments on commit 3a18951

Please sign in to comment.