]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/+admin/admin.component.ts
WIP plugins: plugin settings on server side
[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({
f421fa06 6 templateUrl: './admin.component.html'
7da18e44 7})
7da18e44 8export class AdminComponent {
04e0fc48
C
9 constructor (private auth: AuthService) {}
10
11 hasUsersRight () {
12 return this.auth.getUser().hasRight(UserRight.MANAGE_USERS)
13 }
14
15 hasServerFollowRight () {
16 return this.auth.getUser().hasRight(UserRight.MANAGE_SERVER_FOLLOW)
17 }
18
19 hasVideoAbusesRight () {
20 return this.auth.getUser().hasRight(UserRight.MANAGE_VIDEO_ABUSES)
21 }
22
23 hasVideoBlacklistRight () {
24 return this.auth.getUser().hasRight(UserRight.MANAGE_VIDEO_BLACKLIST)
25 }
26
5d79474c
C
27 hasConfigRight () {
28 return this.auth.getUser().hasRight(UserRight.MANAGE_CONFIGURATION)
04e0fc48 29 }
fd206f0b 30
2c22613c
C
31 hasLogsRight () {
32 return this.auth.getUser().hasRight(UserRight.MANAGE_LOGS)
33 }
34
5d79474c
C
35 hasJobsRight () {
36 return this.auth.getUser().hasRight(UserRight.MANAGE_JOBS)
37 }
38
39 hasDebugRight () {
40 return this.auth.getUser().hasRight(UserRight.MANAGE_DEBUG)
fd206f0b 41 }
7da18e44 42}