]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/shared/users/user.model.ts
Client: Update ng2-file-upload to the module part
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / users / user.model.ts
CommitLineData
7da18e44
C
1export class User {
2 id: string;
3 username: string;
4 role: string;
b539c9b3 5 createdDate: Date;
7da18e44 6
b539c9b3 7 constructor(hash: { id: string, username: string, role: string, createdDate: Date }) {
7da18e44
C
8 this.id = hash.id;
9 this.username = hash.username;
10 this.role = hash.role;
b539c9b3 11 this.createdDate = hash.createdDate;
7da18e44
C
12 }
13
14 isAdmin() {
15 return this.role === 'admin';
16 }
17}