config.json [usernameLength] moved to [userValidationConfig][usernameLength]

revert-dabc3590
Rasika Perera 8 years ago
parent 2550096cea
commit f3588c7951

@ -121,9 +121,9 @@ if (uriMatcher.match("/{context}/api/user/authenticate")) {
} else { } else {
userRoles = String(addUserFormData.userRoles).split(","); userRoles = String(addUserFormData.userRoles).split(",");
} }
if (username.length < devicemgtProps.usernameLength) { if (username.length < devicemgtProps.userValidationConfig.usernameLength) {
log.error("Username Must be between 1 and " + devicemgtProps.usernameLength + " characters long"); log.error("Username Must be between 1 and " + devicemgtProps.userValidationConfig.usernameLength + " characters long");
result = "Username Must be between 1 and " + devicemgtProps.usernameLength + " characters long"; result = "Username Must be between 1 and " + devicemgtProps.userValidationConfig.usernameLength + " characters long";
} else { } else {
try { try {
result = userModule.addUser(username, firstname, lastname, emailAddress, userRoles); result = userModule.addUser(username, firstname, lastname, emailAddress, userRoles);

@ -23,7 +23,9 @@
"tokenServiceURL": "%https.ip%/oauth2/token" "tokenServiceURL": "%https.ip%/oauth2/token"
}, },
"adminUser":"admin", "adminUser":"admin",
"usernameLength":30, "userValidationConfig" : {
"usernameLength":30
},
"device" : { "device" : {
"ios" : { "ios" : {
"location" : "%http.ip%/android-web-agent/public/mdm.page.enrollments.ios.download-agent/asset/ios-agent.ipa", "location" : "%http.ip%/android-web-agent/public/mdm.page.enrollments.ios.download-agent/asset/ios-agent.ipa",

@ -121,9 +121,9 @@ if (uriMatcher.match("/{context}/api/user/authenticate")) {
} else { } else {
userRoles = String(addUserFormData.userRoles).split(","); userRoles = String(addUserFormData.userRoles).split(",");
} }
if (username.length < devicemgtProps.usernameLength) { if (username.length < devicemgtProps.userValidationConfig.usernameLength) {
log.error("Username Must be between 1 and " + devicemgtProps.usernameLength + " characters long"); log.error("Username Must be between 1 and " + devicemgtProps.userValidationConfig.usernameLength + " characters long");
result = "Username Must be between 1 and " + devicemgtProps.usernameLength + " characters long"; result = "Username Must be between 1 and " + devicemgtProps.userValidationConfig.usernameLength + " characters long";
} else { } else {
try { try {
result = userModule.addUser(username, firstname, lastname, emailAddress, userRoles); result = userModule.addUser(username, firstname, lastname, emailAddress, userRoles);

@ -23,7 +23,9 @@
"tokenServiceURL": "%https.ip%/oauth2/token" "tokenServiceURL": "%https.ip%/oauth2/token"
}, },
"adminUser":"admin", "adminUser":"admin",
"usernameLength":30, "userValidationConfig": {
"usernameLength":30
},
"device" : { "device" : {
"ios" : { "ios" : {
"location" : "%http.ip%/windows-web-agent/public/mdm.page.enrollments.ios.download-agent/asset/ios-agent.ipa", "location" : "%http.ip%/windows-web-agent/public/mdm.page.enrollments.ios.download-agent/asset/ios-agent.ipa",

Loading…
Cancel
Save