summaryrefslogtreecommitdiffstats
path: root/app/common
diff options
context:
space:
mode:
authorAppaRao Puli <apparao.puli@linux.intel.com>2019-03-12 14:56:40 +0530
committerGunnar Mills <gmills@us.ibm.com>2019-03-27 18:47:41 +0000
commitb1e7c86360f3f9bb05264a3cdbc5a587aa8f1175 (patch)
treef1c80198d474c9a631fa062f956e0a4398a9ee77 /app/common
parentb5c5dc5d6c7d35738949f8576228076642590864 (diff)
downloadphosphor-webui-b1e7c86360f3f9bb05264a3cdbc5a587aa8f1175.tar.gz
phosphor-webui-b1e7c86360f3f9bb05264a3cdbc5a587aa8f1175.zip
WebUI: Support for configure failed login attempts
This commit adds the support for failed login attempts configuration. With this user can configure the number of failed login attempts and account lockout duration. This also adds provision to view other user account properties like MaxPassword, MinPassword etc. Tested By: Loaded the Webui and modified values like Failed login Attempts and Account lockout duration. Also tested other account properties view. Change-Id: I6abd5a16771956640ba6b6d81c1c7ad9503067b1 Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
Diffstat (limited to 'app/common')
-rw-r--r--app/common/services/api-utils.js33
1 files changed, 33 insertions, 0 deletions
diff --git a/app/common/services/api-utils.js b/app/common/services/api-utils.js
index 743d3fa..9711ba6 100644
--- a/app/common/services/api-utils.js
+++ b/app/common/services/api-utils.js
@@ -685,6 +685,39 @@ window.angular && (function(angular) {
}
return deferred.promise;
},
+
+ getAllUserAccountProperties: function(callback) {
+ return $http({
+ method: 'GET',
+ url: DataService.getHost() + '/redfish/v1/AccountService',
+ withCredentials: true
+ })
+ .then(
+ function(response) {
+ return response.data;
+ },
+ function(error) {
+ console.log(error);
+ });
+ },
+
+ saveUserAccountProperties: function(lockoutduration, lockoutthreshold) {
+ var data = {};
+ if (lockoutduration != undefined) {
+ data['AccountLockoutDuration'] = lockoutduration;
+ }
+ if (lockoutthreshold != undefined) {
+ data['AccountLockoutThreshold'] = lockoutthreshold;
+ }
+
+ return $http({
+ method: 'PATCH',
+ url: DataService.getHost() + '/redfish/v1/AccountService',
+ withCredentials: true,
+ data: data
+ });
+ },
+
createUser: function(user, passwd, role, enabled) {
if (DataService.configJson.redfishSupportEnabled == true) {
var data = {};
OpenPOWER on IntegriCloud