|
@@ -41,9 +41,6 @@ const STATUS_WAIT = 'wait';
|
|
const STATUS_CONFIRM = 'confirm';
|
|
const STATUS_CONFIRM = 'confirm';
|
|
const STATUS_SUCCESS = 'success';
|
|
const STATUS_SUCCESS = 'success';
|
|
|
|
|
|
-declare const PWM_HELPDESK: any;
|
|
|
|
-declare const PWM_VAR: any;
|
|
|
|
-
|
|
|
|
@Component({
|
|
@Component({
|
|
stylesheetUrl: require('helpdesk/helpdesk-detail.component.scss'),
|
|
stylesheetUrl: require('helpdesk/helpdesk-detail.component.scss'),
|
|
templateUrl: require('helpdesk/helpdesk-detail.component.html')
|
|
templateUrl: require('helpdesk/helpdesk-detail.component.html')
|
|
@@ -61,6 +58,7 @@ export default class HelpDeskDetailComponent {
|
|
'IasDialogService',
|
|
'IasDialogService',
|
|
'PeopleService'
|
|
'PeopleService'
|
|
];
|
|
];
|
|
|
|
+
|
|
constructor(private $state: ui.IStateService,
|
|
constructor(private $state: ui.IStateService,
|
|
private $stateParams: ui.IStateParamsService,
|
|
private $stateParams: ui.IStateParamsService,
|
|
private configService: IHelpDeskConfigService,
|
|
private configService: IHelpDeskConfigService,
|
|
@@ -93,28 +91,17 @@ export default class HelpDeskDetailComponent {
|
|
this.configService.getPasswordUiMode()
|
|
this.configService.getPasswordUiMode()
|
|
.then((passwordUiMode) => {
|
|
.then((passwordUiMode) => {
|
|
if (passwordUiMode) {
|
|
if (passwordUiMode) {
|
|
- if (document.title === 'PWM Development') {
|
|
|
|
- const pwUiMode: string = passwordUiMode.toUpperCase();
|
|
|
|
- if (pwUiMode === PASSWORD_UI_MODES.TYPE) {
|
|
|
|
- this.changePasswordType();
|
|
|
|
- }
|
|
|
|
- else if (pwUiMode === PASSWORD_UI_MODES.AUTOGEN) {
|
|
|
|
- this.changePasswordAutogen();
|
|
|
|
- }
|
|
|
|
- else if (pwUiMode === PASSWORD_UI_MODES.BOTH) {
|
|
|
|
- // TODO: Need to take into account both autogen and typing in this scenario
|
|
|
|
- this.changePasswordType();
|
|
|
|
- }
|
|
|
|
- else if (pwUiMode === PASSWORD_UI_MODES.RANDOM) {
|
|
|
|
- this.changePasswordRandom();
|
|
|
|
- }
|
|
|
|
|
|
+ if (passwordUiMode === PASSWORD_UI_MODES.TYPE) {
|
|
|
|
+ this.changePasswordType();
|
|
|
|
+ }
|
|
|
|
+ else if (passwordUiMode === PASSWORD_UI_MODES.AUTOGEN) {
|
|
|
|
+ this.changePasswordAutogen();
|
|
|
|
+ }
|
|
|
|
+ else if (passwordUiMode === PASSWORD_UI_MODES.BOTH) {
|
|
|
|
+ this.changePasswordType();
|
|
}
|
|
}
|
|
- else {
|
|
|
|
- // Until the new AngularJS version of "Change Password" is finished, we'll just call into the
|
|
|
|
- // old PWM JavaScript functions:
|
|
|
|
- PWM_VAR['helpdesk_obfuscatedDN'] = this.getUserKey();
|
|
|
|
- PWM_VAR['helpdesk_setting_PwUiMode'] = passwordUiMode;
|
|
|
|
- PWM_HELPDESK.initiateChangePasswordDialog();
|
|
|
|
|
|
+ else if (passwordUiMode === PASSWORD_UI_MODES.RANDOM) {
|
|
|
|
+ this.changePasswordRandom();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
@@ -167,7 +154,6 @@ export default class HelpDeskDetailComponent {
|
|
controller: 'RandomChangePasswordController as $ctrl',
|
|
controller: 'RandomChangePasswordController as $ctrl',
|
|
templateUrl: randomChangePasswordTemplateUrl,
|
|
templateUrl: randomChangePasswordTemplateUrl,
|
|
locals: {
|
|
locals: {
|
|
- personUsername: this.person.userDisplayName,
|
|
|
|
personUserKey: this.getUserKey()
|
|
personUserKey: this.getUserKey()
|
|
}
|
|
}
|
|
})
|
|
})
|
|
@@ -182,7 +168,6 @@ export default class HelpDeskDetailComponent {
|
|
templateUrl: successChangePasswordTemplateUrl,
|
|
templateUrl: successChangePasswordTemplateUrl,
|
|
locals: {
|
|
locals: {
|
|
changePasswordSuccessData: data,
|
|
changePasswordSuccessData: data,
|
|
- personUsername: this.person.userDisplayName,
|
|
|
|
personUserKey: this.getUserKey()
|
|
personUserKey: this.getUserKey()
|
|
}
|
|
}
|
|
})
|
|
})
|
|
@@ -195,7 +180,6 @@ export default class HelpDeskDetailComponent {
|
|
controller: 'TypeChangePasswordController as $ctrl',
|
|
controller: 'TypeChangePasswordController as $ctrl',
|
|
templateUrl: typeChangePasswordTemplateUrl,
|
|
templateUrl: typeChangePasswordTemplateUrl,
|
|
locals: {
|
|
locals: {
|
|
- personUsername: this.person.userDisplayName,
|
|
|
|
personUserKey: this.getUserKey()
|
|
personUserKey: this.getUserKey()
|
|
}
|
|
}
|
|
}) // TODO: right data type?
|
|
}) // TODO: right data type?
|
|
@@ -225,8 +209,8 @@ export default class HelpDeskDetailComponent {
|
|
'HelpDeskService',
|
|
'HelpDeskService',
|
|
'translateFilter',
|
|
'translateFilter',
|
|
($scope: IScope | any,
|
|
($scope: IScope | any,
|
|
- helpDeskService: IHelpDeskService,
|
|
|
|
- translateFilter: (id: string) => string) => {
|
|
|
|
|
|
+ helpDeskService: IHelpDeskService,
|
|
|
|
+ translateFilter: (id: string) => string) => {
|
|
$scope.status = STATUS_CONFIRM;
|
|
$scope.status = STATUS_CONFIRM;
|
|
$scope.title = translateFilter('Button_HelpdeskClearOtpSecret');
|
|
$scope.title = translateFilter('Button_HelpdeskClearOtpSecret');
|
|
$scope.text = translateFilter('Confirm');
|
|
$scope.text = translateFilter('Confirm');
|
|
@@ -259,8 +243,8 @@ export default class HelpDeskDetailComponent {
|
|
'HelpDeskService',
|
|
'HelpDeskService',
|
|
'translateFilter',
|
|
'translateFilter',
|
|
($scope: IScope | any,
|
|
($scope: IScope | any,
|
|
- helpDeskService: IHelpDeskService,
|
|
|
|
- translateFilter: (id: string) => string) => {
|
|
|
|
|
|
+ helpDeskService: IHelpDeskService,
|
|
|
|
+ translateFilter: (id: string) => string) => {
|
|
$scope.status = STATUS_CONFIRM;
|
|
$scope.status = STATUS_CONFIRM;
|
|
$scope.title = translateFilter('Button_ClearResponses');
|
|
$scope.title = translateFilter('Button_ClearResponses');
|
|
$scope.text = translateFilter('Confirm');
|
|
$scope.text = translateFilter('Confirm');
|
|
@@ -401,8 +385,8 @@ export default class HelpDeskDetailComponent {
|
|
'HelpDeskService',
|
|
'HelpDeskService',
|
|
'translateFilter',
|
|
'translateFilter',
|
|
($scope: IScope | any,
|
|
($scope: IScope | any,
|
|
- helpDeskService: IHelpDeskService,
|
|
|
|
- translateFilter: (id: string) => string) => {
|
|
|
|
|
|
+ helpDeskService: IHelpDeskService,
|
|
|
|
+ translateFilter: (id: string) => string) => {
|
|
$scope.status = STATUS_CONFIRM;
|
|
$scope.status = STATUS_CONFIRM;
|
|
$scope.title = translateFilter('Button_Unlock');
|
|
$scope.title = translateFilter('Button_Unlock');
|
|
$scope.text = translateFilter('Confirm');
|
|
$scope.text = translateFilter('Confirm');
|