]>
Commit | Line | Data |
---|---|---|
1 | import { Component } from '@angular/core' | |
2 | import { UserRight } from '@shared/models' | |
3 | import { AuthService } from '@app/core' | |
4 | ||
5 | @Component({ | |
6 | templateUrl: './system.component.html', | |
7 | styleUrls: [ './system.component.scss' ] | |
8 | }) | |
9 | export class SystemComponent { | |
10 | ||
11 | constructor (private auth: AuthService) {} | |
12 | ||
13 | hasLogsRight () { | |
14 | return this.auth.getUser().hasRight(UserRight.MANAGE_LOGS) | |
15 | } | |
16 | ||
17 | hasJobsRight () { | |
18 | return this.auth.getUser().hasRight(UserRight.MANAGE_JOBS) | |
19 | } | |
20 | ||
21 | hasDebugRight () { | |
22 | return this.auth.getUser().hasRight(UserRight.MANAGE_DEBUG) | |
23 | } | |
24 | } |