summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2015-09-24 11:32:41 +0200
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2015-09-24 11:32:41 +0200
commit3842a2406a56f07b09036f6127703850af89b6c5 (patch)
tree1ba89d89f27ea8b68e4aa68a05ac7b8b8e1a8d83
parent2784e8fc5c1f95298139f584536053e2065055da (diff)
downloadpykolab-3842a2406a56f07b09036f6127703850af89b6c5.tar.gz
Correctly recognize whether an ACL or ACL component is invalid (#4990)
-rw-r--r--pykolab/imap/__init__.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/pykolab/imap/__init__.py b/pykolab/imap/__init__.py
index 160dad8..c969fe6 100644
--- a/pykolab/imap/__init__.py
+++ b/pykolab/imap/__init__.py
@@ -352,8 +352,13 @@ class IMAP(object):
if short_rights.has_key(acl):
acl = short_rights[acl]
else:
- log.error(_("Invalid access identifier %r for subject %r") % (acl, identifier))
- return False
+ for char in acl:
+ if char in "-+":
+ continue
+
+ if not char in short_rights['all']:
+ log.error(_("Invalid access identifier %r for subject %r") % (acl, identifier))
+ return False
# Special treatment for '-' and '+' characters
if '+' in acl or '-' in acl: