1
0
mirror of https://github.com/bitwarden/web synced 2025-12-14 07:13:23 +00:00

make sure key is generated on self host create

This commit is contained in:
Kyle Spearrin
2017-08-22 08:37:07 -04:00
parent 671e9ccb1c
commit 2c2d08c7cc

View File

@@ -58,6 +58,8 @@
}; };
$scope.submit = function (model, form) { $scope.submit = function (model, form) {
var shareKeyCt = cryptoService.makeShareKeyCt();
if ($scope.selfHosted) { if ($scope.selfHosted) {
var fileEl = document.getElementById('file'); var fileEl = document.getElementById('file');
var files = fileEl.files; var files = fileEl.files;
@@ -73,8 +75,6 @@
$scope.submitPromise = apiService.organizations.postLicense(fd).$promise.then(finalizeCreate); $scope.submitPromise = apiService.organizations.postLicense(fd).$promise.then(finalizeCreate);
} }
else { else {
var shareKeyCt = cryptoService.makeShareKeyCt();
if (model.plan === 'free') { if (model.plan === 'free') {
var freeRequest = { var freeRequest = {
name: model.name, name: model.name,