]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/+admin/admin.component.ts
WIP plugins: list installed plugins in client
[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
d00dc28d
C
31 hasPluginsRight () {
32 return this.auth.getUser().hasRight(UserRight.MANAGE_PLUGINS)
33 }
34
2c22613c
C
35 hasLogsRight () {
36 return this.auth.getUser().hasRight(UserRight.MANAGE_LOGS)
37 }
38
5d79474c
C
39 hasJobsRight () {
40 return this.auth.getUser().hasRight(UserRight.MANAGE_JOBS)
41 }
42
43 hasDebugRight () {
44 return this.auth.getUser().hasRight(UserRight.MANAGE_DEBUG)
fd206f0b 45 }
7da18e44 46}