Il giorno 16/mar/2012, alle ore 15.34, Colm O hEigeartaigh ha scritto:

> Thanks for your response Fabio.
> 
>> I think so. Username is mandatory and unique so it could be used in place of 
>> id.
>> Probably this kind of improvement should be done before the next official 
>> release.
>> 
>> I suggest to open a new issue on for this.
> 
> Done:
> 
> https://issues.apache.org/jira/browse/SYNCOPE-42

Thank you.

>> You should be able to modify user's attributes without specifying any new 
>> password.
>> Can you provide more information in order to reproduce your case?
> 
> Yes - the problem is when you specify the same username/Id/password as
> currently exists. I get an error:
> 
> Syncope.InvalidSyncopeUser.element : Entry: InvalidPassword: Used
> word(s) not permitted
> 
> I guess the core logic is assuming that if a password is specified in
> the UserMod then it means the the user wishes to change the password,
> and is not allowing the new password as it's the same as the old?

Default password policy do not permit to specify a new password equals to the 
old one.
If UserMod contain a null password no changes to the password will be performed.

>> For example if you want to change the userId attribute you can do:
>> 
>>       userMod.addAttributeToBeRemoved("userId");
>>       attributeMod = new AttributeMod();
>>       attributeMod.setSchema("userId");
>>       attributeMod.addValueToBeAdded("[email protected]");
>>       userMod.addAttributeToBeUpdated(attributeMod);
> 
> Excellent, thanks for the information. I find this a little
> unintuitive though, i.e. why should you have to remove something
> before updating it?

You are right, this is really unintuitive.
If I well remember the "remove" before the "update" is mandatory only in case 
of unique attributes.
In this case, without the remove, an invalid constraint violation will be 
thrown.

Regards,
F.

Reply via email to