]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/core/menu/menu-admin.component.ts
Add follow tabs
[github/Chocobozzz/PeerTube.git] / client / src / app / core / menu / menu-admin.component.ts
CommitLineData
df98563e 1import { Component } from '@angular/core'
602eb142 2
954605a8
C
3import { AuthService } from '../auth/auth.service'
4import { 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
11export 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}