Fix moderators that cannot access the muted servers table
[oweals/peertube.git] / client / src / app / +admin / moderation / moderation.component.ts
1 import { Component } from '@angular/core'
2 import { UserRight } from '../../../../../shared'
3 import { AuthService } from '@app/core/auth/auth.service'
4
5 @Component({
6   templateUrl: './moderation.component.html',
7   styleUrls: [ './moderation.component.scss' ]
8 })
9 export class ModerationComponent {
10   constructor (private auth: AuthService) {}
11
12   hasVideoAbusesRight () {
13     return this.auth.getUser().hasRight(UserRight.MANAGE_VIDEO_ABUSES)
14   }
15
16   hasVideoBlacklistRight () {
17     return this.auth.getUser().hasRight(UserRight.MANAGE_VIDEO_BLACKLIST)
18   }
19
20   hasAccountsBlocklistRight () {
21     return this.auth.getUser().hasRight(UserRight.MANAGE_ACCOUNTS_BLOCKLIST)
22   }
23
24   hasServersBlocklistRight () {
25     return this.auth.getUser().hasRight(UserRight.MANAGE_SERVERS_BLOCKLIST)
26   }
27 }