diff options
Diffstat (limited to 'client/src/app/shared/users/user.model.ts')
-rw-r--r-- | client/src/app/shared/users/user.model.ts | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/client/src/app/shared/users/user.model.ts b/client/src/app/shared/users/user.model.ts index 7beea5910..d738899ab 100644 --- a/client/src/app/shared/users/user.model.ts +++ b/client/src/app/shared/users/user.model.ts | |||
@@ -1,7 +1,9 @@ | |||
1 | import { | 1 | import { |
2 | User as UserServerModel, | 2 | User as UserServerModel, |
3 | UserRole, | 3 | UserRole, |
4 | VideoChannel | 4 | VideoChannel, |
5 | UserRight, | ||
6 | hasUserRight | ||
5 | } from '../../../../../shared' | 7 | } from '../../../../../shared' |
6 | 8 | ||
7 | export type UserConstructorHash = { | 9 | export type UserConstructorHash = { |
@@ -56,7 +58,7 @@ export class User implements UserServerModel { | |||
56 | } | 58 | } |
57 | } | 59 | } |
58 | 60 | ||
59 | isAdmin () { | 61 | hasRight (right: UserRight) { |
60 | return this.role === 'admin' | 62 | return hasUserRight(this.role, right) |
61 | } | 63 | } |
62 | } | 64 | } |