aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/core/auth/auth.service.ts
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-10-27 16:55:03 +0200
committerChocobozzz <florian.bigard@gmail.com>2017-10-27 16:55:03 +0200
commit954605a804da399317ca62afa2fb9244afa11ebf (patch)
treede6ee69280bfb928bc01c29430e13d5b820e921a /client/src/app/core/auth/auth.service.ts
parente02573ad67626210ed279bad321ee139094921a1 (diff)
downloadPeerTube-954605a804da399317ca62afa2fb9244afa11ebf.tar.gz
PeerTube-954605a804da399317ca62afa2fb9244afa11ebf.tar.zst
PeerTube-954605a804da399317ca62afa2fb9244afa11ebf.zip
Support roles with rights and add moderator role
Diffstat (limited to 'client/src/app/core/auth/auth.service.ts')
-rw-r--r--client/src/app/core/auth/auth.service.ts8
1 files changed, 1 insertions, 7 deletions
diff --git a/client/src/app/core/auth/auth.service.ts b/client/src/app/core/auth/auth.service.ts
index 9ac9ba7bb..df6e5135b 100644
--- a/client/src/app/core/auth/auth.service.ts
+++ b/client/src/app/core/auth/auth.service.ts
@@ -21,7 +21,7 @@ import {
21// Do not use the barrel (dependency loop) 21// Do not use the barrel (dependency loop)
22import { RestExtractor } from '../../shared/rest' 22import { RestExtractor } from '../../shared/rest'
23import { UserLogin } from '../../../../../shared/models/users/user-login.model' 23import { UserLogin } from '../../../../../shared/models/users/user-login.model'
24import { User, UserConstructorHash } from '../../shared/users/user.model' 24import { UserConstructorHash } from '../../shared/users/user.model'
25 25
26interface UserLoginWithUsername extends UserLogin { 26interface UserLoginWithUsername extends UserLogin {
27 access_token: string 27 access_token: string
@@ -126,12 +126,6 @@ export class AuthService {
126 return this.user 126 return this.user
127 } 127 }
128 128
129 isAdmin () {
130 if (this.user === null) return false
131
132 return this.user.isAdmin()
133 }
134
135 isLoggedIn () { 129 isLoggedIn () {
136 return !!this.getAccessToken() 130 return !!this.getAccessToken()
137 } 131 }