]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/menu/menu-admin.component.ts
Fix test
[github/Chocobozzz/PeerTube.git] / client / src / app / menu / menu-admin.component.ts
CommitLineData
df98563e 1import { Component } from '@angular/core'
602eb142 2
b33f657c
C
3import { AuthService } from '../core/auth/auth.service'
4import { UserRight } from '../../../../shared'
954605a8 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
11export class MenuAdminComponent {
12 constructor (private auth: AuthService) {}
13
14 hasUsersRight () {
15 return this.auth.getUser().hasRight(UserRight.MANAGE_USERS)
16 }
17
4610bc5b
C
18 hasServerFollowRight () {
19 return this.auth.getUser().hasRight(UserRight.MANAGE_SERVER_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 }
5cd80545
C
29
30 hasJobsRight () {
31 return this.auth.getUser().hasRight(UserRight.MANAGE_JOBS)
32 }
954605a8 33}