]>
Commit | Line | Data |
---|---|---|
df98563e | 1 | import { Component } from '@angular/core' |
602eb142 | 2 | |
954605a8 C |
3 | import { AuthService } from '../auth/auth.service' |
4 | import { UserRight } from '../../../../../shared' | |
5 | ||
602eb142 C |
6 | @Component({ |
7 | selector: 'my-menu-admin', | |
383bfc83 | 8 | templateUrl: './menu-admin.component.html', |
3eeeb87f | 9 | styleUrls: [ './menu.component.scss' ] |
602eb142 | 10 | }) |
954605a8 C |
11 | export class MenuAdminComponent { |
12 | constructor (private auth: AuthService) {} | |
13 | ||
14 | hasUsersRight () { | |
15 | return this.auth.getUser().hasRight(UserRight.MANAGE_USERS) | |
16 | } | |
17 | ||
51548b31 C |
18 | hasApplicationFollowRight () { |
19 | return this.auth.getUser().hasRight(UserRight.MANAGE_APPLICATION_FOLLOW) | |
954605a8 C |
20 | } |
21 | ||
22 | hasVideoAbusesRight () { | |
23 | return this.auth.getUser().hasRight(UserRight.MANAGE_VIDEO_ABUSES) | |
24 | } | |
25 | ||
26 | hasVideoBlacklistRight () { | |
27 | return this.auth.getUser().hasRight(UserRight.MANAGE_VIDEO_BLACKLIST) | |
28 | } | |
29 | } |