Update with latest SNJS changes
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user