X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2F%2Badmin%2Fmoderation%2Fmoderation.component.ts;h=b0f5eb2243cb86e546422413318bc117145fbc0f;hb=cfde28bac33c3644e1b6218eb471b675a37def60;hp=7744deb06ba2d768d6e332dfc7c34fa798627d98;hpb=ba430d7516bc5b1324b60571ba7594460969b7fb;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 7744deb06..b0f5eb224 100644 --- a/client/src/app/+admin/moderation/moderation.component.ts +++ b/client/src/app/+admin/moderation/moderation.component.ts @@ -1,38 +1,19 @@ import { Component, OnInit } from '@angular/core' -import { UserRight } from '../../../../../shared' -import { AuthService, ServerService } from '@app/core' +import { ServerService } from '@app/core' @Component({ templateUrl: './moderation.component.html', styleUrls: [ './moderation.component.scss' ] }) export class ModerationComponent implements OnInit { - autoBlacklistVideosEnabled = false + autoBlockVideosEnabled = 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) - } - - 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) + .subscribe(config => this.autoBlockVideosEnabled = config.autoBlacklist.videos.ofUsers.enabled) } }