[Freeipa-devel] [PATCH] webui: 696 support wildcard attribute level rights
Petr Vobornik
pvoborni at redhat.com
Mon Jul 21 11:35:27 UTC 2014
On 18.7.2014 00:03, Endi Sukma Dewata wrote:
> On 7/10/2014 7:23 AM, Petr Vobornik wrote:
>> Reproduction:
>> * add 'extensibleObject' object class to target object
>>
>> 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.
--
Petr Vobornik
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-pvoborni-0696-1-webui-support-wildcard-attribute-level-rights.patch
Type: text/x-patch
Size: 2681 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20140721/a08c8f7d/attachment.bin>
More information about the Freeipa-devel
mailing list