Petr Viktorin wrote:
On 07/25/2012 05:03 AM, Rob Crittenden wrote:
The configuration options for the default user and map order were a bit
broken in several ways.
I wasn't handling the case where one of the values was coming from LDAP
so was a list vs as an option which was a string, so all sorts of bad
interesting things were happening.
There is also the setattr problem. We would normally handle that in a
validator so it is not a problem but in this case we may need to compare
two options passed in and we can't do that in a validator. So
potentially changes may come in as a option, in entry_attrs or from
config.
I added a few tests to help keep this robust.
When testing this remember that the user map order list needs to be
quoted otherwise the shell is going to interpret the $.
rob
ACK, with nitpicks :)
I think using `copy.deepcopy(options)` instead of simply `dict(options)`
is unnecessary; do you have a special reason for it?
And note the style guide discourages line continuation backslashes:
+ if 'ipaselinuxusermapdefault' in validate or \
+ 'ipaselinuxusermaporder' in validate:
in favor of parentheses:
+ if ('ipaselinuxusermapdefault' in validate or
+ 'ipaselinuxusermaporder' in validate):
Fixed both and pushed to master.
rob
_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel