X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2F%2Badmin%2Fadmin.component.ts;h=75cd50cc7543caa7fb61b090a69853ddee939c4a;hb=15ca2e871aa069e596baf9da22b3d2a1ab1a0b1a;hp=64a7400e7e954d5c8d3660a054b7c2c06cb132e7;hpb=b99290b1d5d736083513fb8f66e91f61bfe07e0b;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/+admin/admin.component.ts b/client/src/app/+admin/admin.component.ts index 64a7400e7..75cd50cc7 100644 --- a/client/src/app/+admin/admin.component.ts +++ b/client/src/app/+admin/admin.component.ts @@ -1,8 +1,31 @@ -import { Component } from '@angular/core'; +import { Component } from '@angular/core' +import { UserRight } from '../../../../shared' +import { AuthService } from '../core/auth/auth.service' @Component({ - template: '' + templateUrl: './admin.component.html', + styleUrls: [ './admin.component.scss' ] }) - export class AdminComponent { + constructor (private auth: AuthService) {} + + hasUsersRight () { + return this.auth.getUser().hasRight(UserRight.MANAGE_USERS) + } + + hasServerFollowRight () { + return this.auth.getUser().hasRight(UserRight.MANAGE_SERVER_FOLLOW) + } + + hasVideoAbusesRight () { + return this.auth.getUser().hasRight(UserRight.MANAGE_VIDEO_ABUSES) + } + + hasVideoBlacklistRight () { + return this.auth.getUser().hasRight(UserRight.MANAGE_VIDEO_BLACKLIST) + } + + hasJobsRight () { + return this.auth.getUser().hasRight(UserRight.MANAGE_JOBS) + } }