aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+admin/admin.component.ts
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-12-08 10:41:49 +0100
committerChocobozzz <florian.bigard@gmail.com>2017-12-08 10:41:49 +0100
commit04e0fc488826f505a8de3ce99113f3cb2fcec147 (patch)
tree92cfb91ebfd284735026433abd54e4fd560bda41 /client/src/app/+admin/admin.component.ts
parent18327bdf51ff534136d06906ba5c1f228718c371 (diff)
downloadPeerTube-04e0fc488826f505a8de3ce99113f3cb2fcec147.tar.gz
PeerTube-04e0fc488826f505a8de3ce99113f3cb2fcec147.tar.zst
PeerTube-04e0fc488826f505a8de3ce99113f3cb2fcec147.zip
Begin admin design
Diffstat (limited to 'client/src/app/+admin/admin.component.ts')
-rw-r--r--client/src/app/+admin/admin.component.ts26
1 files changed, 25 insertions, 1 deletions
diff --git a/client/src/app/+admin/admin.component.ts b/client/src/app/+admin/admin.component.ts
index ecd62ee61..75cd50cc7 100644
--- a/client/src/app/+admin/admin.component.ts
+++ b/client/src/app/+admin/admin.component.ts
@@ -1,7 +1,31 @@
1import { Component } from '@angular/core' 1import { Component } from '@angular/core'
2import { UserRight } from '../../../../shared'
3import { AuthService } from '../core/auth/auth.service'
2 4
3@Component({ 5@Component({
4 template: '<router-outlet></router-outlet>' 6 templateUrl: './admin.component.html',
7 styleUrls: [ './admin.component.scss' ]
5}) 8})
6export class AdminComponent { 9export class AdminComponent {
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 }
7} 31}