1 import { Component } from '@angular/core'
2 import { UserRight } from '../../../../shared'
3 import { AuthService } from '../core/auth/auth.service'
6 templateUrl: './admin.component.html'
8 export class AdminComponent {
9 constructor (private auth: AuthService) {}
12 return this.auth.getUser().hasRight(UserRight.MANAGE_USERS)
15 hasServerFollowRight () {
16 return this.auth.getUser().hasRight(UserRight.MANAGE_SERVER_FOLLOW)
19 hasVideoAbusesRight () {
20 return this.auth.getUser().hasRight(UserRight.MANAGE_VIDEO_ABUSES)
23 hasVideoBlacklistRight () {
24 return this.auth.getUser().hasRight(UserRight.MANAGE_VIDEO_BLACKLIST)
28 return this.auth.getUser().hasRight(UserRight.MANAGE_CONFIGURATION)
32 return this.auth.getUser().hasRight(UserRight.MANAGE_PLUGINS)
36 return this.auth.getUser().hasRight(UserRight.MANAGE_LOGS)
40 return this.auth.getUser().hasRight(UserRight.MANAGE_JOBS)
44 return this.auth.getUser().hasRight(UserRight.MANAGE_DEBUG)