Projects
Kolab:3.4
pykolab
pykolab-0.6.11-apt-ldap-fixes-concat.patch
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File pykolab-0.6.11-apt-ldap-fixes-concat.patch of Package pykolab (Revision 63)
Currently displaying revision
63
,
Show latest
diff -ur pykolab-0.6.11.orig/pykolab/auth/ldap/__init__.py pykolab-0.6.11/pykolab/auth/ldap/__init__.py --- pykolab-0.6.11.orig/pykolab/auth/ldap/__init__.py 2014-01-28 12:33:07.000000000 +0100 +++ pykolab-0.6.11/pykolab/auth/ldap/__init__.py 2014-02-12 15:40:16.837527961 +0100 @@ -1150,7 +1150,7 @@ foldertype_attribute = self.config_get('sharedfolder_type_attribute') if not foldertype_attribute == None: if not entry.has_key(foldertype_attribute): - entry[foldertype_attribute] = self.get_user_attribute( + entry[foldertype_attribute] = self.get_entry_attribute( entry['id'], foldertype_attribute ) @@ -1252,10 +1252,6 @@ entry['kolabfoldertype'] ) - if entry.has_key(delivery_address_attribute) and \ - not entry[delivery_address_attribute] == None: - self.imap.set_acl(folder_path, 'anyone', 'p') - if entry.has_key('kolabmailfolderaclentry') and \ not entry['kolabmailfolderaclentry'] == None: @@ -1263,6 +1259,10 @@ entry['kolabmailfolderaclentry'] ) + if entry.has_key(delivery_address_attribute) and \ + not entry[delivery_address_attribute] == None: + self.imap.set_acl(folder_path, 'anyone', '+p') + #if server == None: #self.entry_set_attribute(mailserver_attribute, server) @@ -1519,7 +1519,7 @@ foldertype_attribute = self.config_get('sharedfolder_type_attribute') if not foldertype_attribute == None: if not entry.has_key(foldertype_attribute): - entry[foldertype_attribute] = self.get_user_attribute( + entry[foldertype_attribute] = self.get_entry_attribute( entry['id'], foldertype_attribute ) @@ -1769,12 +1769,16 @@ entry['kolabfoldertype'] ) - #if entry.has_key('kolabmailfolderaclentry') and \ - #not entry['kolabmailfolderaclentry'] == None: + if entry.has_key('kolabmailfolderaclentry') and \ + not entry['kolabmailfolderaclentry'] == None: + + self.imap._set_kolab_mailfolder_acls( + entry['kolabmailfolderaclentry'] + ) - #self.imap._set_kolab_mailfolder_acls( - #entry['kolabmailfolderaclentry'] - #) + if entry.has_key(delivery_address_attribute) and \ + not entry[delivery_address_attribute] == None: + self.imap.set_acl(folder_path, 'anyone', '+p') #if server == None: #self.entry_set_attribute(mailserver_attribute, server) Only in pykolab-0.6.11/pykolab/auth/ldap: __init__.py.orig diff -ur pykolab-0.6.11.orig/pykolab/imap/__init__.py pykolab-0.6.11/pykolab/imap/__init__.py --- pykolab-0.6.11.orig/pykolab/imap/__init__.py 2014-01-28 12:33:07.000000000 +0100 +++ pykolab-0.6.11/pykolab/imap/__init__.py 2014-02-12 15:40:16.838527957 +0100 @@ -328,6 +328,36 @@ if short_rights.has_key(acl): acl = short_rights[acl] + # Special treatment for '-' and '+' characters + if '+' in acl or '-' in acl: + acl_map = { + 'set': '', + 'subtract': '', + 'add': '' + } + + mode = 'set' + for char in acl: + if char == '-': + mode = 'subtract' + continue + if char == '+': + continue + mode = 'add' + + acl_map[mode] += char + + current_acls = self.imap.lam(self.folder_utf7(folder)) + for current_acl in current_acls.keys(): + if current_acl == identifier: + _acl = current_acls[current_acl] + break + + _acl = _acl + acl_map['set'] + acl_map['add'] + + _acl = [x for x in _acl.split() if x not in acl_map['subtract'].split()] + acl = ''.join(list(set(_acl))) + self.imap.sam(self.folder_utf7(folder), identifier, acl) def set_metadata(self, folder, metadata_path, metadata_value, shared=True):
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.