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

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to