X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2F%2Badmin%2Fmoderation%2Fmoderation.component.ts;h=7744deb06ba2d768d6e332dfc7c34fa798627d98;hb=bb152476c819e4c7487d080433c616f0d523e049;hp=0f4efb970177f0fec0f76ecf30ba02acff059b89;hpb=614d1ae928ec307b708c4a3eb423797353b1df2a;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/+admin/moderation/moderation.component.ts b/client/src/app/+admin/moderation/moderation.component.ts index 0f4efb970..7744deb06 100644 --- a/client/src/app/+admin/moderation/moderation.component.ts +++ b/client/src/app/+admin/moderation/moderation.component.ts @@ -1,13 +1,24 @@ -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) @@ -16,4 +27,12 @@ export class ModerationComponent { hasVideoBlacklistRight () { return this.auth.getUser().hasRight(UserRight.MANAGE_VIDEO_BLACKLIST) } + + hasAccountsBlocklistRight () { + return this.auth.getUser().hasRight(UserRight.MANAGE_ACCOUNTS_BLOCKLIST) + } + + hasServersBlocklistRight () { + return this.auth.getUser().hasRight(UserRight.MANAGE_SERVERS_BLOCKLIST) + } }