Ticket #260: aym-ldapdir-fix01.diff
| File aym-ldapdir-fix01.diff, 1.9 KB (added by oxullo@…, 14 months ago) |
|---|
-
ldapdirectory.py
old new 146 146 uid = None 147 147 148 148 # Find or build email 149 emailAddresses = self._getMultipleLdapAttributes(attrs, 'mail') 149 emailAddresses = set(map(lambda v: 'mailto:' + v, self._getMultipleLdapAttributes(attrs, 'mail'))) 150 150 151 emailSuffix = self._rdnSchema[recordType]['emailSuffix'] 151 152 if len(emailAddresses) == 0 and emailSuffix is not None: 152 153 emailPrefix = self._getUniqueLdapAttribute(attrs, self._rdnSchema[recordType]['attr']) 153 emailAddresses.add( emailPrefix + emailSuffix)154 emailAddresses.add('mailto:' + emailPrefix + emailSuffix) 154 155 155 156 # LDAP attribute -> principal matchings 156 157 if recordType == DirectoryService.recordType_users: … … 165 166 fullName = self._getUniqueLdapAttribute(attrs, 'cn') 166 167 calendarUserAddresses = emailAddresses 167 168 enabledForCalendaring = True 169 elif recordType in (DirectoryService.recordType_resources, DirectoryService.recordType_locations): 170 shortName = self._getUniqueLdapAttribute(attrs, 'cn') 171 fullName = self._getUniqueLdapAttribute(attrs, 'cn') 172 calendarUserAddresses = emailAddresses 173 enabledForCalendaring = True 174 autoSchedule = True 168 175 169 176 return LdapDirectoryRecord( 170 177 service = self, … … 352 359 353 360 def readOnlyProxyFor(self, read_write=True): 354 361 return () 362 363 # Returns true regardless of the type. We want to be able to add delegation to 364 # locations and resources, due to the complete lack of a directory-based 365 # mechanism to create proxies 366 def hasEditableProxyMembership(self): 367 return True 355 368 356 369 # Credentials are checked against the LDAP server 357 370 # Thus, the password is needed in clear-text and digest authentication
