2017-06-16 07:32:15 -05:00
|
|
|
import { Component } from '@angular/core'
|
2017-12-08 03:41:49 -06:00
|
|
|
import { UserRight } from '../../../../shared'
|
|
|
|
import { AuthService } from '../core/auth/auth.service'
|
2016-08-09 14:45:21 -05:00
|
|
|
|
|
|
|
@Component({
|
2019-04-02 10:39:21 -05:00
|
|
|
templateUrl: './admin.component.html'
|
2016-08-09 14:45:21 -05:00
|
|
|
})
|
|
|
|
export class AdminComponent {
|
2017-12-08 03:41:49 -06:00
|
|
|
constructor (private auth: AuthService) {}
|
|
|
|
|
|
|
|
hasUsersRight () {
|
|
|
|
return this.auth.getUser().hasRight(UserRight.MANAGE_USERS)
|
|
|
|
}
|
|
|
|
|
|
|
|
hasServerFollowRight () {
|
|
|
|
return this.auth.getUser().hasRight(UserRight.MANAGE_SERVER_FOLLOW)
|
|
|
|
}
|
|
|
|
|
|
|
|
hasVideoAbusesRight () {
|
|
|
|
return this.auth.getUser().hasRight(UserRight.MANAGE_VIDEO_ABUSES)
|
|
|
|
}
|
|
|
|
|
|
|
|
hasVideoBlacklistRight () {
|
|
|
|
return this.auth.getUser().hasRight(UserRight.MANAGE_VIDEO_BLACKLIST)
|
|
|
|
}
|
|
|
|
|
|
|
|
hasJobsRight () {
|
|
|
|
return this.auth.getUser().hasRight(UserRight.MANAGE_JOBS)
|
|
|
|
}
|
2018-01-17 03:32:03 -06:00
|
|
|
|
|
|
|
hasConfigRight () {
|
|
|
|
return this.auth.getUser().hasRight(UserRight.MANAGE_CONFIGURATION)
|
|
|
|
}
|
2016-08-09 14:45:21 -05:00
|
|
|
}
|