Updates
This commit is contained in:
@@ -14,17 +14,20 @@ class PrivilegesManagementModal {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
controller($scope, privilegesManager, passcodeManager, $timeout) {
|
controller($scope, privilegesManager, passcodeManager, authManager, $timeout) {
|
||||||
'ngInject';
|
'ngInject';
|
||||||
|
|
||||||
$scope.dummy = {};
|
$scope.dummy = {};
|
||||||
|
|
||||||
$scope.hasPasscode = passcodeManager.hasPasscode();
|
$scope.hasPasscode = passcodeManager.hasPasscode();
|
||||||
|
$scope.hasAccount = !authManager.offline();
|
||||||
|
|
||||||
$scope.displayInfoForCredential = function(credential) {
|
$scope.displayInfoForCredential = function(credential) {
|
||||||
let info = privilegesManager.displayInfoForCredential(credential);
|
let info = privilegesManager.displayInfoForCredential(credential);
|
||||||
if(credential == PrivilegesManager.CredentialLocalPasscode) {
|
if(credential == PrivilegesManager.CredentialLocalPasscode) {
|
||||||
info["availability"] = $scope.hasPasscode;
|
info["availability"] = $scope.hasPasscode;
|
||||||
|
} else if(credential == PrivilegesManager.CredentialAccountPassword) {
|
||||||
|
info["availability"] = $scope.hasAccount;
|
||||||
} else {
|
} else {
|
||||||
info["availability"] = true;
|
info["availability"] = true;
|
||||||
}
|
}
|
||||||
@@ -69,7 +72,6 @@ class PrivilegesManagementModal {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$scope.checkboxValueChanged = function(action, credential) {
|
$scope.checkboxValueChanged = function(action, credential) {
|
||||||
console.log("toggleCredentialForAction", action, credential);
|
|
||||||
$scope.privileges.toggleCredentialForAction(action, credential);
|
$scope.privileges.toggleCredentialForAction(action, credential);
|
||||||
privilegesManager.savePrivileges();
|
privilegesManager.savePrivileges();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,9 +30,9 @@ class PrivilegesManager {
|
|||||||
PrivilegesManager.SessionLengthOneWeek = 604800;
|
PrivilegesManager.SessionLengthOneWeek = 604800;
|
||||||
|
|
||||||
this.availableActions = [
|
this.availableActions = [
|
||||||
|
PrivilegesManager.ActionManagePrivileges,
|
||||||
PrivilegesManager.ActionManageExtensions,
|
PrivilegesManager.ActionManageExtensions,
|
||||||
PrivilegesManager.ActionManageBackups,
|
PrivilegesManager.ActionManageBackups,
|
||||||
PrivilegesManager.ActionManagePrivileges,
|
|
||||||
PrivilegesManager.ActionManagePasscode,
|
PrivilegesManager.ActionManagePasscode,
|
||||||
PrivilegesManager.ActionViewLockedNotes,
|
PrivilegesManager.ActionViewLockedNotes,
|
||||||
PrivilegesManager.ActionDeleteNote
|
PrivilegesManager.ActionDeleteNote
|
||||||
@@ -61,6 +61,10 @@ class PrivilegesManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
presentPrivilegesModal(action, onSuccess, onCancel) {
|
presentPrivilegesModal(action, onSuccess, onCancel) {
|
||||||
|
if(this.authenticationInProgress()) {
|
||||||
|
onCancel && onCancel();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
let customSuccess = () => {
|
let customSuccess = () => {
|
||||||
onSuccess && onSuccess();
|
onSuccess && onSuccess();
|
||||||
|
|||||||
@@ -87,7 +87,7 @@
|
|||||||
|
|
||||||
%a.panel-row.condensed{"ng-click" => "openPasswordWizard('change-pw')"}
|
%a.panel-row.condensed{"ng-click" => "openPasswordWizard('change-pw')"}
|
||||||
Change Password
|
Change Password
|
||||||
%a.panel-row.condensed{"ng-click" => "openPrivilegesModal('')"}
|
%a.panel-row.condensed{"ng-show" => "user", "ng-click" => "openPrivilegesModal('')"}
|
||||||
Manage Privileges
|
Manage Privileges
|
||||||
%a.panel-row.justify-left.condensed.success{"ng-if" => "securityUpdateAvailable", "ng-click" => "openPasswordWizard('upgrade-security')"}
|
%a.panel-row.justify-left.condensed.success{"ng-if" => "securityUpdateAvailable", "ng-click" => "openPasswordWizard('upgrade-security')"}
|
||||||
.inline.circle.small.success.mr-8
|
.inline.circle.small.success.mr-8
|
||||||
@@ -114,6 +114,7 @@
|
|||||||
%p Adding a passcode is not supported in temporary sessions. Please sign out, then sign back in with the "Stay signed in" option checked.
|
%p Adding a passcode is not supported in temporary sessions. Please sign out, then sign back in with the "Stay signed in" option checked.
|
||||||
|
|
||||||
%form{"ng-if" => "formData.showPasscodeForm", "ng-submit" => "submitPasscodeForm()"}
|
%form{"ng-if" => "formData.showPasscodeForm", "ng-submit" => "submitPasscodeForm()"}
|
||||||
|
.panel-row
|
||||||
%input.form-control{:type => 'password', "ng-model" => "formData.passcode", "placeholder" => "Passcode", "sn-autofocus" => "true", "should-focus" => "true"}
|
%input.form-control{:type => 'password', "ng-model" => "formData.passcode", "placeholder" => "Passcode", "sn-autofocus" => "true", "should-focus" => "true"}
|
||||||
%input.form-control{:type => 'password', "ng-model" => "formData.confirmPasscode", "placeholder" => "Confirm Passcode"}
|
%input.form-control{:type => 'password', "ng-model" => "formData.confirmPasscode", "placeholder" => "Confirm Passcode"}
|
||||||
.button-group.stretch.panel-row.form-submit
|
.button-group.stretch.panel-row.form-submit
|
||||||
@@ -138,6 +139,8 @@
|
|||||||
{{option.label}}
|
{{option.label}}
|
||||||
%p The autolock timer begins when the window or tab loses focus.
|
%p The autolock timer begins when the window or tab loses focus.
|
||||||
|
|
||||||
|
%a.panel-row.condensed{"ng-show" => "!user", "ng-click" => "openPrivilegesModal('')"}
|
||||||
|
Manage Privileges
|
||||||
|
|
||||||
.panel-section{"ng-if" => "!importData.loading"}
|
.panel-section{"ng-if" => "!importData.loading"}
|
||||||
%h3.title Data Backups
|
%h3.title Data Backups
|
||||||
|
|||||||
Reference in New Issue
Block a user