diff options
author | Chocobozzz <me@florianbigard.com> | 2019-04-11 10:56:29 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-04-11 10:58:09 +0200 |
commit | 5d79474cc66383ecbfcef6366f63a34c3af21cbf (patch) | |
tree | 6b2cd85c25294ca04c94cbbcc90353d25e9cee06 /client/src/app/+admin/system/system.component.ts | |
parent | 2b3f1919fda81c2781ceeb9071d426c184e1b21c (diff) | |
download | PeerTube-5d79474cc66383ecbfcef6366f63a34c3af21cbf.tar.gz PeerTube-5d79474cc66383ecbfcef6366f63a34c3af21cbf.tar.zst PeerTube-5d79474cc66383ecbfcef6366f63a34c3af21cbf.zip |
Add debug component to help admins to fix IP issues
Diffstat (limited to 'client/src/app/+admin/system/system.component.ts')
-rw-r--r-- | client/src/app/+admin/system/system.component.ts | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/client/src/app/+admin/system/system.component.ts b/client/src/app/+admin/system/system.component.ts index 992d9c8af..b544c2a97 100644 --- a/client/src/app/+admin/system/system.component.ts +++ b/client/src/app/+admin/system/system.component.ts | |||
@@ -1,8 +1,24 @@ | |||
1 | import { Component } from '@angular/core' | 1 | import { Component } from '@angular/core' |
2 | import { UserRight } from '@shared/models' | ||
3 | import { AuthService } from '@app/core' | ||
2 | 4 | ||
3 | @Component({ | 5 | @Component({ |
4 | templateUrl: './system.component.html', | 6 | templateUrl: './system.component.html', |
5 | styleUrls: [ './system.component.scss' ] | 7 | styleUrls: [ './system.component.scss' ] |
6 | }) | 8 | }) |
7 | export class SystemComponent { | 9 | export class SystemComponent { |
10 | |||
11 | constructor (private auth: AuthService) {} | ||
12 | |||
13 | hasLogsRight () { | ||
14 | return this.auth.getUser().hasRight(UserRight.MANAGE_LOGS) | ||
15 | } | ||
16 | |||
17 | hasJobsRight () { | ||
18 | return this.auth.getUser().hasRight(UserRight.MANAGE_JOBS) | ||
19 | } | ||
20 | |||
21 | hasDebugRight () { | ||
22 | return this.auth.getUser().hasRight(UserRight.MANAGE_DEBUG) | ||
23 | } | ||
8 | } | 24 | } |