]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/+admin/admin.component.ts
Embed player responsive
[github/Chocobozzz/PeerTube.git] / client / src / app / +admin / admin.component.ts
CommitLineData
df98563e 1import { Component } from '@angular/core'
04e0fc48
C
2import { UserRight } from '../../../../shared'
3import { AuthService } from '../core/auth/auth.service'
7da18e44
C
4
5@Component({
04e0fc48
C
6 templateUrl: './admin.component.html',
7 styleUrls: [ './admin.component.scss' ]
7da18e44 8})
7da18e44 9export class AdminComponent {
04e0fc48
C
10 constructor (private auth: AuthService) {}
11
12 hasUsersRight () {
13 return this.auth.getUser().hasRight(UserRight.MANAGE_USERS)
14 }
15
16 hasServerFollowRight () {
17 return this.auth.getUser().hasRight(UserRight.MANAGE_SERVER_FOLLOW)
18 }
19
20 hasVideoAbusesRight () {
21 return this.auth.getUser().hasRight(UserRight.MANAGE_VIDEO_ABUSES)
22 }
23
24 hasVideoBlacklistRight () {
25 return this.auth.getUser().hasRight(UserRight.MANAGE_VIDEO_BLACKLIST)
26 }
27
28 hasJobsRight () {
29 return this.auth.getUser().hasRight(UserRight.MANAGE_JOBS)
30 }
7da18e44 31}