]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/+admin/moderation/moderation.component.ts
Move to sass module
[github/Chocobozzz/PeerTube.git] / client / src / app / +admin / moderation / moderation.component.ts
index 7744deb06ba2d768d6e332dfc7c34fa798627d98..44dd11c47e79296526f6e68c8cb82602a2826f58 100644 (file)
@@ -1,38 +1,20 @@
 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' ]
+  styleUrls: [ ]
 })
 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)
+    const serverConfig = this.serverService.getHTMLConfig()
 
-  }
-
-  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)
+    this.autoBlockVideosEnabled = serverConfig.autoBlacklist.videos.ofUsers.enabled
   }
 }