mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2026-07-29 15:55:47 -05:00
ipalib.aci: Add support for == and != operators to ACI
This allows more natural comparisons. Reviewed-By: Rob Crittenden <rcritten@redhat.com>
This commit is contained in:
@@ -253,6 +253,12 @@ class ACI:
|
||||
# We got this far so lets declare them the same
|
||||
return True
|
||||
|
||||
__eq__ = isequal
|
||||
|
||||
def __neq__(self, b):
|
||||
return not self == b
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
# a = ACI('(targetattr="title")(targetfilter="(memberOf=cn=bar,cn=groups,cn=accounts ,dc=example,dc=com)")(version 3.0;acl "foobar";allow (write) groupdn="ldap:///cn=foo,cn=groups,cn=accounts,dc=example,dc=com";)')
|
||||
# print a
|
||||
|
||||
Reference in New Issue
Block a user