diff options
Diffstat (limited to 'src/store')
-rw-r--r-- | src/store/modules/AccessControl/LocalUserMangementStore.js | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/store/modules/AccessControl/LocalUserMangementStore.js b/src/store/modules/AccessControl/LocalUserMangementStore.js index 67c3a1e4..7ad3ff50 100644 --- a/src/store/modules/AccessControl/LocalUserMangementStore.js +++ b/src/store/modules/AccessControl/LocalUserMangementStore.js @@ -257,6 +257,33 @@ const LocalUserManagementStore = { return toastMessages; }) ); + }, + async saveAccountSettings( + { dispatch }, + { lockoutThreshold, lockoutDuration } + ) { + const data = {}; + if (lockoutThreshold !== undefined) { + data.AccountLockoutThreshold = lockoutThreshold; + } + if (lockoutDuration !== undefined) { + data.AccountLockoutDuration = lockoutDuration; + } + + return await api + .patch('/redfish/v1/AccountService', data) + //GET new settings to update view + .then(() => dispatch('getAccountSettings')) + .then(() => + i18n.t('localUserManagement.toastMessages.successSaveSettings') + ) + .catch(error => { + console.log(error); + const message = i18n.t( + 'localUserManagement.toastMessages.errorSaveSettings' + ); + throw new Error(message); + }); } } }; |