diff options
Diffstat (limited to 'pykolab/auth/ldap/__init__.py')
-rw-r--r-- | pykolab/auth/ldap/__init__.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/pykolab/auth/ldap/__init__.py b/pykolab/auth/ldap/__init__.py index 62acf27..01fd41c 100644 --- a/pykolab/auth/ldap/__init__.py +++ b/pykolab/auth/ldap/__init__.py @@ -1325,7 +1325,11 @@ class LDAP(pykolab.base.Base): for acl_entry in entry[folderacl_entry_attribute]: acl_access = acl_entry.split()[-1] - aci_subject = ', '.join(acl_entry.split(', ')[:-1]) + + if len(acl_entry.split(', ')) > 0: + aci_subject = ', '.join(acl_entry.split(', ')[:-1]) + else: + aci_subject = acl_entry.split()[0] log.debug(_("Found a subject %r with access %r") % (aci_subject, acl_access), level=8) @@ -1715,7 +1719,11 @@ class LDAP(pykolab.base.Base): for acl_entry in entry[folderacl_entry_attribute]: acl_access = acl_entry.split()[-1] - aci_subject = ', '.join(acl_entry.split(', ')[:-1]) + + if len(acl_entry.split(', ')) > 0: + aci_subject = ', '.join(acl_entry.split(', ')[:-1]) + else: + aci_subject = acl_entry.split()[0] log.debug(_("Found a subject %r with access %r") % (aci_subject, acl_access), level=8) |