[Freeipa-devel] [PATCH] webui: 696 support wildcard attribute level rights
Endi Sukma Dewata
edewata at redhat.com
Fri Jul 25 20:25:35 UTC 2014
On 7/21/2014 6:35 AM, Petr Vobornik wrote:
>>> https://fedorahosted.org/freeipa/ticket/4380
>>
>> This is the original if-condition:
>>
>> (!rights
>> && !(that.flags.indexOf('w_if_no_aci') > -1
>> && write_oc))
>> || (rights && rights.indexOf('w') < 0)
>>
>> Here if 'rights' has a value but there's no 'w' in it, the expression
>> will evaluate to true.
>>
>> This is the new code:
>>
>> !can_write
>> && !rights
>> && !(that.flags.indexOf('w_if_no_aci') > -1 && write_oc)
>>
>> Here if 'rights' has any value the expression will evaluate to false. Is
>> this correct?
>>
>
> You're right, there is an error. Attaching new version. The code is
> rewritten to be more comprehensible - use cases are in separate variables.
ACK. The code now makes more sense.
--
Endi S. Dewata
More information about the Freeipa-devel
mailing list