1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-12-28 17:27:50 +01:00

totp flag on logins

This commit is contained in:
Kyle Spearrin 2017-07-07 14:07:30 -04:00
parent 49dbf4945f
commit 08b432775e
4 changed files with 8 additions and 10 deletions

View File

@ -7,11 +7,11 @@ angular
$scope.go = function () {
$analytics.eventTrack('Get Paid Org');
$state.go('backend.org.billing', { orgId: orgId }).then(function () {
$scope.close();
$uibModalStack.dismissAll();
});
};
$scope.close = function () {
$uibModalStack.dismissAll();
$uibModalInstance.dismiss('close');
};
});

View File

@ -7,11 +7,11 @@ angular
$scope.go = function () {
$analytics.eventTrack('Get Premium');
$state.go('backend.user.settingsPremium').then(function () {
$scope.close();
$uibModalStack.dismissAll();
});
};
$scope.close = function () {
$uibModalStack.dismissAll();
$uibModalInstance.dismiss('close');
};
});

View File

@ -2,18 +2,14 @@
.module('bit.vault')
.controller('organizationVaultEditLoginController', function ($scope, apiService, $uibModalInstance, cryptoService,
cipherService, passwordService, loginId, $analytics, authService, orgId, $uibModal) {
cipherService, passwordService, loginId, $analytics, orgId, $uibModal) {
$analytics.eventTrack('organizationVaultEditLoginController', { category: 'Modal' });
$scope.login = {};
$scope.hideFolders = $scope.hideFavorite = $scope.fromOrg = true;
authService.getUserProfile().then(function (userProfile) {
var orgProfile = userProfile.organizations[orgId];
$scope.useTotp = orgProfile.useTotp;
});
apiService.logins.getAdmin({ id: loginId }, function (login) {
$scope.login = cipherService.decryptLogin(login);
$scope.useTotp = $scope.login.organizationUseTotp;
});
$scope.save = function (model) {

View File

@ -31,6 +31,7 @@ angular
folderId: encryptedLogin.FolderId,
favorite: encryptedLogin.Favorite,
edit: encryptedLogin.Edit,
organizationUseTotp: encryptedLogin.OrganizationUseTotp,
name: cryptoService.decrypt(encryptedLogin.Name, key),
uri: encryptedLogin.Uri && encryptedLogin.Uri !== '' ? cryptoService.decrypt(encryptedLogin.Uri, key) : null,
username: encryptedLogin.Username && encryptedLogin.Username !== '' ? cryptoService.decrypt(encryptedLogin.Username, key) : null,
@ -67,6 +68,7 @@ angular
folderId: encryptedCipher.FolderId,
favorite: encryptedCipher.Favorite,
edit: encryptedCipher.Edit,
organizationUseTotp: encryptedCipher.OrganizationUseTotp,
name: _service.decryptProperty(encryptedCipher.Data.Name, key, false),
username: _service.decryptProperty(encryptedCipher.Data.Username, key, true),
password: _service.decryptProperty(encryptedCipher.Data.Password, key, true),