Update with latest SNJS changes

This commit is contained in:
Mo Bitar
2020-03-01 16:12:29 -06:00
parent fc88ab9b2b
commit 444c18bbde
27 changed files with 192 additions and 104131 deletions

View File

@@ -14,14 +14,14 @@ class PrivilegesAuthModalCtrl {
$onInit() {
this.authParameters = {};
this.sessionLengthOptions = this.application.privilegesManager.getSessionLengthOptions();
this.application.privilegesManager.getSelectedSessionLength()
this.sessionLengthOptions = this.application.privilegesService.getSessionLengthOptions();
this.application.privilegesService.getSelectedSessionLength()
.then((length) => {
this.$timeout(() => {
this.selectedSessionLength = length;
});
});
this.application.privilegesManager.netCredentialsForAction(this.action)
this.application.privilegesService.netCredentialsForAction(this.action)
.then((credentials) => {
this.$timeout(() => {
this.requiredCredentials = credentials.sort();
@@ -34,7 +34,7 @@ class PrivilegesAuthModalCtrl {
}
promptForCredential(credential) {
return this.application.privilegesManager.displayInfoForCredential(credential).prompt;
return this.application.privilegesService.displayInfoForCredential(credential).prompt;
}
cancel() {
@@ -67,13 +67,13 @@ class PrivilegesAuthModalCtrl {
if (!this.validate()) {
return;
}
const result = await this.application.privilegesManager.authenticateAction(
const result = await this.application.privilegesService.authenticateAction(
this.action,
this.authParameters
);
this.$timeout(() => {
if (result.success) {
this.application.privilegesManager.setSessionLength(this.selectedSessionLength);
this.application.privilegesService.setSessionLength(this.selectedSessionLength);
this.onSuccess();
this.dismiss();
} else {