1 import { Component } from '@angular/core'
2 import { UserRight } from '../../../../../shared'
3 import { AuthService, ServerService } from '@app/core'
6 templateUrl: './moderation.component.html',
7 styleUrls: [ './moderation.component.scss' ]
9 export class ModerationComponent {
10 autoBlacklistVideosEnabled: boolean
13 private auth: AuthService,
14 private serverService: ServerService
16 this.autoBlacklistVideosEnabled = this.serverService.getConfig().autoBlacklist.videos.ofUsers.enabled
19 hasVideoAbusesRight () {
20 return this.auth.getUser().hasRight(UserRight.MANAGE_VIDEO_ABUSES)
23 hasVideoBlacklistRight () {
24 return this.auth.getUser().hasRight(UserRight.MANAGE_VIDEO_BLACKLIST)
27 hasAccountsBlocklistRight () {
28 return this.auth.getUser().hasRight(UserRight.MANAGE_ACCOUNTS_BLOCKLIST)
31 hasServersBlocklistRight () {
32 return this.auth.getUser().hasRight(UserRight.MANAGE_SERVERS_BLOCKLIST)