Ticket #1425 (closed defect: fixed)

Opened 14 years ago

Last modified 14 years ago

Assumption on members directory entry id field

Reported by: gracinet Owned by: tziade
Priority: P2 Milestone: CPS 3.4.1
Component: CPSMailAccess Version: TRUNK
Severity: minor Keywords: directory user member webmail_enabled
Cc:

Description

from mailtool.canHaveMailBox:

            kw = {'id': user.getId()}
            dir_results = self._searchEntries('members', [webmail_enabled_field]
,
                                              **kw)

Since mailtool._searchEntries just looks up the directory and forwards the query to it, this assumes that users have an entry in directory 'members', which has an 'id' field whose value always equals user.getId() and breaks some setups.

For example, in CPSUserFolderLDAPSetup, this field's name is 'uid'.

Change History

comment:1 Changed 14 years ago by fguillaume

Yes it should use something like self.id_field.

Also return_fields should be passed as an explicit keyword argument, not a positional one, which is error-prone.

comment:2 Changed 14 years ago by gracinet

Planned changes: ask User Folder for its user dir & entry id

  • in mailtool (canHaveMailBox)
  • in mailbox (readDirectoryValue), if dirname is 'members'. Now if someone uses another directory for auth but still has a 'members' directory for auth *and* it's meaningful for MailAccess?, they are looking for trouble and will get it.

comment:3 Changed 14 years ago by gracinet

_searchEntries has to be replaced for this purposes by getEntry. It's a bit worse for Z3/Z2 insulation, but _searchEntries has two different bogus behaviours for this (substring on id + read_expr stuff).

comment:4 Changed 14 years ago by gracinet

Done in [34866]

comment:5 Changed 14 years ago by gracinet

  • Status changed from new to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.