diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-12-08 10:41:49 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-12-08 10:41:49 +0100 |
commit | 04e0fc488826f505a8de3ce99113f3cb2fcec147 (patch) | |
tree | 92cfb91ebfd284735026433abd54e4fd560bda41 /client/src/app/+admin/admin.component.ts | |
parent | 18327bdf51ff534136d06906ba5c1f228718c371 (diff) | |
download | PeerTube-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.ts | 26 |
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 @@ | |||
1 | import { Component } from '@angular/core' | 1 | import { Component } from '@angular/core' |
2 | import { UserRight } from '../../../../shared' | ||
3 | import { 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 | }) |
6 | export class AdminComponent { | 9 | export 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 | } |