diff options
author | Rigel Kent <sendmemail@rigelk.eu> | 2020-07-02 09:00:17 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-07-02 09:22:59 +0200 |
commit | 0a4cb95c98d4b6f7c3e404535996f706c659e13e (patch) | |
tree | 4a5ac666cfcda7e4bd15a5fa07785d96e8f31738 /client/src/app/+admin/moderation/moderation.component.ts | |
parent | c7b836303c48861cc1681006fd4630d286a3b200 (diff) | |
download | PeerTube-0a4cb95c98d4b6f7c3e404535996f706c659e13e.tar.gz PeerTube-0a4cb95c98d4b6f7c3e404535996f706c659e13e.tar.zst PeerTube-0a4cb95c98d4b6f7c3e404535996f706c659e13e.zip |
simplify navigation within most admin menus
Diffstat (limited to 'client/src/app/+admin/moderation/moderation.component.ts')
-rw-r--r-- | client/src/app/+admin/moderation/moderation.component.ts | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/client/src/app/+admin/moderation/moderation.component.ts b/client/src/app/+admin/moderation/moderation.component.ts index 806f9d100..b0f5eb224 100644 --- a/client/src/app/+admin/moderation/moderation.component.ts +++ b/client/src/app/+admin/moderation/moderation.component.ts | |||
@@ -1,6 +1,5 @@ | |||
1 | import { Component, OnInit } from '@angular/core' | 1 | import { Component, OnInit } from '@angular/core' |
2 | import { AuthService, ServerService } from '@app/core' | 2 | import { ServerService } from '@app/core' |
3 | import { UserRight } from '@shared/models' | ||
4 | 3 | ||
5 | @Component({ | 4 | @Component({ |
6 | templateUrl: './moderation.component.html', | 5 | templateUrl: './moderation.component.html', |
@@ -10,29 +9,11 @@ export class ModerationComponent implements OnInit { | |||
10 | autoBlockVideosEnabled = false | 9 | autoBlockVideosEnabled = false |
11 | 10 | ||
12 | constructor ( | 11 | constructor ( |
13 | private auth: AuthService, | ||
14 | private serverService: ServerService | 12 | private serverService: ServerService |
15 | ) { } | 13 | ) { } |
16 | 14 | ||
17 | ngOnInit (): void { | 15 | ngOnInit (): void { |
18 | this.serverService.getConfig() | 16 | this.serverService.getConfig() |
19 | .subscribe(config => this.autoBlockVideosEnabled = config.autoBlacklist.videos.ofUsers.enabled) | 17 | .subscribe(config => this.autoBlockVideosEnabled = config.autoBlacklist.videos.ofUsers.enabled) |
20 | |||
21 | } | ||
22 | |||
23 | hasVideoAbusesRight () { | ||
24 | return this.auth.getUser().hasRight(UserRight.MANAGE_VIDEO_ABUSES) | ||
25 | } | ||
26 | |||
27 | hasVideoBlocklistRight () { | ||
28 | return this.auth.getUser().hasRight(UserRight.MANAGE_VIDEO_BLACKLIST) | ||
29 | } | ||
30 | |||
31 | hasAccountsBlocklistRight () { | ||
32 | return this.auth.getUser().hasRight(UserRight.MANAGE_ACCOUNTS_BLOCKLIST) | ||
33 | } | ||
34 | |||
35 | hasServersBlocklistRight () { | ||
36 | return this.auth.getUser().hasRight(UserRight.MANAGE_SERVERS_BLOCKLIST) | ||
37 | } | 18 | } |
38 | } | 19 | } |