[Freeipa-devel] [PATCH] webui: 696 support wildcard attribute level rights

Endi Sukma Dewata edewata at redhat.com
Thu Jul 17 22:03:26 UTC 2014


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?

-- 
Endi S. Dewata




More information about the Freeipa-devel mailing list