From 705d68ddcb3dfb98e7ce9a0ef4c9397977ab3f53 Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Fri, 9 Nov 2007 13:58:36 -0500 Subject: Require uniqueness in the name/comment field of delegations Fix error reporting in the UI to include the detailed message Sort delegations by name when displaying them Update the name field from "Name" to "Delegation Name" --- ipa-python/aci.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'ipa-python') diff --git a/ipa-python/aci.py b/ipa-python/aci.py index 60e19075..d35da8da 100644 --- a/ipa-python/aci.py +++ b/ipa-python/aci.py @@ -37,6 +37,16 @@ class ACI: if acistr is not None: self.parse_acistr(acistr) + def __getitem__(self,key): + """Fake getting attributes by key for sorting""" + if key == 0: + return self.name + if key == 1: + return self.source_group + if key == 2: + return self.dest_group + raise TypeError("Unknown key value %s" % key) + def export_to_string(self): """Converts the ACI to a string suitable for an LDAP aci attribute.""" attrs_str = ' || '.join(self.attrs) -- cgit