Ticket #1030 (closed defect: fixed)

Opened 14 years ago

Last modified 14 years ago

GroupsDirectory.listEntryIds() returns a tuple instead of a list

Reported by: bruno@… Owned by: fguillaume
Priority: P3 Milestone: unspecified
Component: CPSDirectory Version: 3.3.6
Severity: trivial Keywords:


GroupsDirectory.listEntryIds() returns a tuple, when all others directories return a list. This is certainly not a major bug, but it should not take much more than 3 minutes to fix (well, perhaps a bit more to run tests...), and having a coherent behaviour would be nice !-)

Here's a possible fix:

    def listEntryIds(self):
        """List all the entry ids."""
        portal = getToolByName(self, 'portal_url').getPortalObject()
        aclu = portal.acl_users
        if hasattr(aclu, 'getGroupNames'):
            return list(aclu.getGroupNames())
            return []

NB: if this is-a-feature-not-a-bug, it would be nice to document it.

Change History

comment:1 Changed 14 years ago by lregebro

  • Status changed from new to closed
  • Resolution set to fixed

Changed in [28669].

Note: See TracTickets for help on using tickets.