mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged 5.2.0 (5.2.0) to HEAD (5.2)
133094 mward: REPO-1627: oldPassword/password validation improvement git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@133390 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -519,6 +519,10 @@ public class PeopleImpl implements People
|
||||
// The user is not an admin user and is not attempting to update *their own* details.
|
||||
throw new PermissionDeniedException();
|
||||
}
|
||||
if (!isAdminAuthority() && person.getOldPassword() != null && person.getPassword() == null)
|
||||
{
|
||||
throw new IllegalArgumentException("To change password, both 'oldPassword' and 'password' fields are required.");
|
||||
}
|
||||
|
||||
final String personIdToUpdate = validatePerson(personId);
|
||||
final Map<QName, Serializable> properties = person.toProperties();
|
||||
|
Reference in New Issue
Block a user