[Freeipa-devel] [PATCH] 270 Fixed posix group checkbox.

Endi Sukma Dewata edewata at redhat.com
Fri Sep 16 13:59:22 UTC 2011


On 9/15/2011 11:36 AM, Petr Vobornik wrote:
> On 09/15/2011 02:06 AM, Endi Sukma Dewata wrote:
>> In the adder dialog for groups the checkbox has been modified to use
>> the correct field name "nonposix" and be checked by default.
>>
>> Note: This is a temporary fix to minimize the changes due to release
>> schedule. Eventually the field label will be changed into "Non-POSIX
>> group" and the checkbox will be unchecked by default, which is more
>> consistent with CLI.
>>
>> Ticket #1799
>
> The temporary workaround approach is good but there might be a minor
> issue. One test for this patch fails. It is because current
> implementation sets checked attribute to false for all values except
> 'TRUE'. Previous implementation set checked to true if there was any
> value except 'FALSE'. I tried to search for all usages of checkbox and
> found that this behaviour is not a problem right now, but I'm not sure
> if it won't be in the future (but there would have to be changes in save
> method). So if its OK, after a test correction I would consider it ACKed.

Attached is the updated patch. I fixed the test case and did some 
cleanup. This is actually the problem I mentioned in the meeting (so 
patch 271 is actually fine).

It looks like currently the checkbox widget is only used with boolean 
attributes. And it will only work with boolean attributes anyway because 
right now the save() will always return a boolean value. But for now I'm 
trying to use the original loaded/default value unless it's 'TRUE' or 
'FALSE' which will be converted into boolean.

In the future we might want to use this with non-boolean attributes. So 
we need to be able to map a pair of non-boolean values into checked and 
unchecked state during load()/reset() and vice versa during save().

--
Endi S. Dewata
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-edewata-0270-2-Fixed-posix-group-checkbox.patch
Type: text/x-patch
Size: 4446 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20110916/f8e77868/attachment.bin>


More information about the Freeipa-devel mailing list