source: src/Clients/Angular/finki-chattery/src/app/core/guards/authorized-student.guard.ts@ 32cd040

dev
Last change on this file since 32cd040 was 32cd040, checked in by Стојков Марко <mst@…>, 3 years ago

Added generic component for asking questions

  • Property mode set to 100644
File size: 448 bytes
Line 
1import { Injectable } from '@angular/core';
2import { CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
3import { AuthService } from '../services';
4
5@Injectable({
6 providedIn: 'root'
7})
8export class AuthorizedStudentGuard implements CanActivate {
9 constructor(private auth: AuthService) {}
10
11 canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean {
12 return this.auth.isStudent();
13 }
14}
Note: See TracBrowser for help on using the repository browser.