aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/menu/menu-admin.component.ts
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-12-01 09:20:19 +0100
committerChocobozzz <florian.bigard@gmail.com>2017-12-01 10:55:56 +0100
commitb33f657c304b77938c1f68164d8e754787f5aae5 (patch)
tree93c47cfff0124a1084e7c5344969a82ed60ee926 /client/src/app/menu/menu-admin.component.ts
parentfef2c7164e025b12a64185dbab058ef4129733c6 (diff)
downloadPeerTube-b33f657c304b77938c1f68164d8e754787f5aae5.tar.gz
PeerTube-b33f657c304b77938c1f68164d8e754787f5aae5.tar.zst
PeerTube-b33f657c304b77938c1f68164d8e754787f5aae5.zip
Begin new menu design
Diffstat (limited to 'client/src/app/menu/menu-admin.component.ts')
-rw-r--r--client/src/app/menu/menu-admin.component.ts33
1 files changed, 33 insertions, 0 deletions
diff --git a/client/src/app/menu/menu-admin.component.ts b/client/src/app/menu/menu-admin.component.ts
new file mode 100644
index 000000000..1babf5eb6
--- /dev/null
+++ b/client/src/app/menu/menu-admin.component.ts
@@ -0,0 +1,33 @@
1import { Component } from '@angular/core'
2
3import { AuthService } from '../core/auth/auth.service'
4import { UserRight } from '../../../../shared'
5
6@Component({
7 selector: 'my-menu-admin',
8 templateUrl: './menu-admin.component.html',
9 styleUrls: [ './menu.component.scss' ]
10})
11export class MenuAdminComponent {
12 constructor (private auth: AuthService) {}
13
14 hasUsersRight () {
15 return this.auth.getUser().hasRight(UserRight.MANAGE_USERS)
16 }
17
18 hasServerFollowRight () {
19 return this.auth.getUser().hasRight(UserRight.MANAGE_SERVER_FOLLOW)
20 }
21
22 hasVideoAbusesRight () {
23 return this.auth.getUser().hasRight(UserRight.MANAGE_VIDEO_ABUSES)
24 }
25
26 hasVideoBlacklistRight () {
27 return this.auth.getUser().hasRight(UserRight.MANAGE_VIDEO_BLACKLIST)
28 }
29
30 hasJobsRight () {
31 return this.auth.getUser().hasRight(UserRight.MANAGE_JOBS)
32 }
33}