mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-21 18:09:20 +00:00
Share User Console tool enhancements and fixes:
- Username and password field length checks based on config values (ALFCOM-2907, ETHREEOH-1199) - Password checked against Validate Password field on Create and Update of a user (ALFCOM-2913, ALFCOM-2922) - Fix to recently broken script People API - attempting to create a user with a username that already exists did not return null but instead throw an exception (ALFCOM-2921) - Field validation correctly trims fields before validation (ALFCOM-2920) git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@14663 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -29,9 +29,9 @@ function main()
|
|||||||
}
|
}
|
||||||
|
|
||||||
var password = "password";
|
var password = "password";
|
||||||
if(json.has("password"))
|
if (json.has("password"))
|
||||||
{
|
{
|
||||||
password = json.get("password");
|
password = json.get("password");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create the person with the supplied user name
|
// Create the person with the supplied user name
|
||||||
@@ -42,7 +42,7 @@ function main()
|
|||||||
// return error message if a person with that user name could not be created
|
// return error message if a person with that user name could not be created
|
||||||
if (person === null)
|
if (person === null)
|
||||||
{
|
{
|
||||||
status.setCode(status.STATUS_INTERNAL_SERVER_ERROR, "Person could not be created with user name: " + userName);
|
status.setCode(status.STATUS_CONFLICT, "User name already exists: " + userName);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user