-import { Component } from '@angular/core'
+import { Component, OnInit } from '@angular/core'
import { UserRight } from '../../../../../shared'
-import { AuthService } from '@app/core/auth/auth.service'
+import { AuthService, ServerService } from '@app/core'
@Component({
templateUrl: './moderation.component.html',
styleUrls: [ './moderation.component.scss' ]
})
-export class ModerationComponent {
- constructor (private auth: AuthService) {}
+export class ModerationComponent implements OnInit {
+ autoBlacklistVideosEnabled = false
+
+ constructor (
+ private auth: AuthService,
+ private serverService: ServerService
+ ) { }
+
+ ngOnInit (): void {
+ this.serverService.getConfig()
+ .subscribe(config => this.autoBlacklistVideosEnabled = config.autoBlacklist.videos.ofUsers.enabled)
+
+ }
hasVideoAbusesRight () {
return this.auth.getUser().hasRight(UserRight.MANAGE_VIDEO_ABUSES)