login model adjustments
This commit is contained in:
parent
2ae21eef82
commit
1053491d28
|
@ -20,6 +20,8 @@ var LoginData = function (response, userId) {
|
||||||
this.organizationId = response.organizationId;
|
this.organizationId = response.organizationId;
|
||||||
this.folderId = response.folderId;
|
this.folderId = response.folderId;
|
||||||
this.userId = userId;
|
this.userId = userId;
|
||||||
|
this.edit = response.edit;
|
||||||
|
this.organizationUseTotp = response.organizationUseTotp;
|
||||||
|
|
||||||
if (response instanceof LoginResponse) {
|
if (response instanceof LoginResponse) {
|
||||||
this.name = response.name;
|
this.name = response.name;
|
||||||
|
|
|
@ -93,6 +93,8 @@ var Login = function (obj, alreadyEncrypted) {
|
||||||
this.organizationId = obj.organizationId ? obj.organizationId : null;
|
this.organizationId = obj.organizationId ? obj.organizationId : null;
|
||||||
this.folderId = obj.folderId ? obj.folderId : null;
|
this.folderId = obj.folderId ? obj.folderId : null;
|
||||||
this.favorite = obj.favorite ? true : false;
|
this.favorite = obj.favorite ? true : false;
|
||||||
|
this.organizationUseTotp = obj.organizationUseTotp ? true : false;
|
||||||
|
this.edit = obj.edit ? true : false;
|
||||||
|
|
||||||
if (alreadyEncrypted === true) {
|
if (alreadyEncrypted === true) {
|
||||||
this.name = obj.name ? obj.name : null;
|
this.name = obj.name ? obj.name : null;
|
||||||
|
|
|
@ -39,7 +39,7 @@ angular
|
||||||
$scope.login.showLaunch = false;
|
$scope.login.showLaunch = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (model.totp) {
|
if (model.totp && (login.organizationUseTotp || false)) {
|
||||||
totpUpdateCode();
|
totpUpdateCode();
|
||||||
totpTick();
|
totpTick();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue