1 import { Component, OnInit } 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 implements OnInit {
10 autoBlacklistVideosEnabled = false
13 private auth: AuthService,
14 private serverService: ServerService
18 this.serverService.getConfig()
19 .subscribe(config => this.autoBlacklistVideosEnabled = config.autoBlacklist.videos.ofUsers.enabled)
23 hasVideoAbusesRight () {
24 return this.auth.getUser().hasRight(UserRight.MANAGE_VIDEO_ABUSES)
27 hasVideoBlacklistRight () {
28 return this.auth.getUser().hasRight(UserRight.MANAGE_VIDEO_BLACKLIST)
31 hasAccountsBlocklistRight () {
32 return this.auth.getUser().hasRight(UserRight.MANAGE_ACCOUNTS_BLOCKLIST)
35 hasServersBlocklistRight () {
36 return this.auth.getUser().hasRight(UserRight.MANAGE_SERVERS_BLOCKLIST)