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 {
userRoles = String(addUserFormData.userRoles).split(",");
}
if (username.length < devicemgtProps.usernameLength) {
log.error("Username Must be between 1 and " + devicemgtProps.usernameLength + " characters long");
result = "Username Must be between 1 and " + devicemgtProps.usernameLength + " characters long";
if (username.length < devicemgtProps.userValidationConfig.usernameLength) {
log.error("Username Must be between 1 and " + devicemgtProps.userValidationConfig.usernameLength + " characters long");
result = "Username Must be between 1 and " + devicemgtProps.userValidationConfig.usernameLength + " characters long";
} else {
try {
result = userModule.addUser(username, firstname, lastname, emailAddress, userRoles);

@ -23,7 +23,9 @@
"tokenServiceURL": "%https.ip%/oauth2/token"
},
"adminUser":"admin",
"usernameLength":30,
"userValidationConfig" : {
"usernameLength":30
},
"device" : {
"ios" : {
"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 {
userRoles = String(addUserFormData.userRoles).split(",");
}
if (username.length < devicemgtProps.usernameLength) {
log.error("Username Must be between 1 and " + devicemgtProps.usernameLength + " characters long");
result = "Username Must be between 1 and " + devicemgtProps.usernameLength + " characters long";
if (username.length < devicemgtProps.userValidationConfig.usernameLength) {
log.error("Username Must be between 1 and " + devicemgtProps.userValidationConfig.usernameLength + " characters long");
result = "Username Must be between 1 and " + devicemgtProps.userValidationConfig.usernameLength + " characters long";
} else {
try {
result = userModule.addUser(username, firstname, lastname, emailAddress, userRoles);

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

Loading…
Cancel
Save