2017-03-12 16:24:15 +00:00
|
|
|
function UserViewModel(data) {
|
|
|
|
this.Id = data.Id;
|
|
|
|
this.Username = data.Username;
|
2017-05-23 18:56:10 +00:00
|
|
|
this.Role = data.Role;
|
2017-03-12 16:24:15 +00:00
|
|
|
if (data.Role === 1) {
|
2017-05-23 18:56:10 +00:00
|
|
|
this.RoleName = 'administrator';
|
2017-03-12 16:24:15 +00:00
|
|
|
} else {
|
2017-05-23 18:56:10 +00:00
|
|
|
this.RoleName = 'user';
|
2017-03-12 16:24:15 +00:00
|
|
|
}
|
2017-08-10 08:35:23 +00:00
|
|
|
this.AuthenticationMethod = data.AuthenticationMethod;
|
2017-03-12 16:24:15 +00:00
|
|
|
this.Checked = false;
|
|
|
|
}
|