]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/app/core/menu/menu-admin.component.ts
ea8d5f57cb6c1a10fe981bd4d6d3afe75a3da39f
[github/Chocobozzz/PeerTube.git] / client / src / app / core / menu / menu-admin.component.ts
1 import { Component } from '@angular/core'
2
3 import { AuthService } from '../auth/auth.service'
4 import { UserRight } from '../../../../../shared'
5
6 @Component({
7 selector: 'my-menu-admin',
8 templateUrl: './menu-admin.component.html',
9 styleUrls: [ './menu.component.scss' ]
10 })
11 export class MenuAdminComponent {
12 constructor (private auth: AuthService) {}
13
14 hasUsersRight () {
15 return this.auth.getUser().hasRight(UserRight.MANAGE_USERS)
16 }
17
18 hasServerFollowRight () {
19 return this.auth.getUser().hasRight(UserRight.MANAGE_SERVER_FOLLOW)
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
30 hasJobsRight () {
31 return this.auth.getUser().hasRight(UserRight.MANAGE_JOBS)
32 }
33 }