1 import { Component } from '@angular/core'
3 import { AuthService } from '../core/auth/auth.service'
4 import { UserRight } from '../../../../shared'
7 selector: 'my-menu-admin',
8 templateUrl: './menu-admin.component.html',
9 styleUrls: [ './menu.component.scss' ]
11 export class MenuAdminComponent {
12 constructor (private auth: AuthService) {}
15 return this.auth.getUser().hasRight(UserRight.MANAGE_USERS)
18 hasServerFollowRight () {
19 return this.auth.getUser().hasRight(UserRight.MANAGE_SERVER_FOLLOW)
22 hasVideoAbusesRight () {
23 return this.auth.getUser().hasRight(UserRight.MANAGE_VIDEO_ABUSES)
26 hasVideoBlacklistRight () {
27 return this.auth.getUser().hasRight(UserRight.MANAGE_VIDEO_BLACKLIST)
31 return this.auth.getUser().hasRight(UserRight.MANAGE_JOBS)