1
0
Fork 0
peertube/client/src/app/+admin/admin.component.ts

32 lines
817 B
TypeScript
Raw Normal View History

import { Component } from '@angular/core'
2017-12-08 04:41:49 -05:00
import { UserRight } from '../../../../shared'
import { AuthService } from '../core/auth/auth.service'
2016-08-09 15:45:21 -04:00
@Component({
2017-12-08 04:41:49 -05:00
templateUrl: './admin.component.html',
styleUrls: [ './admin.component.scss' ]
2016-08-09 15:45:21 -04:00
})
export class AdminComponent {
2017-12-08 04:41:49 -05: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)
}
2016-08-09 15:45:21 -04:00
}