Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#13548 closed defect (fixed)

Duplicated option

Reported by: Ryan J Ollos Owned by: Ryan J Ollos
Priority: normal Component: DirectoryAuthPlugin
Severity: normal Keywords:
Cc: Trac Release:


The option group_nameattr is duplicated in and

Untested patch:

  • tracext/dirauth/

    99# Author: John Hampton <>
    1111from trac.perm import DefaultPermissionStore
    12 from trac.config import Option
    1413__all__ = ['UserExtensiblePermissionStore']
    1615class UserExtensiblePermissionStore(DefaultPermissionStore):
    1716    """ Default Permission Store extended to list all ldap groups """
    19     group_nameattr = Option('account-manager', 'group_nameattr', 'cn',
    20                              "Specify the attribute to read the group name. Defaults to 'cn'. For full group names use 'dn'.")
    2218    def get_all_permissions(self):
    2319        """Return all permissions for all users.
    4137            if p[1][0:1] != "@":
    4238                filteredPermissions.append(p)
     40        group_nameattr = \
     41                self.config.get('account-manager', 'group_nameattr', 'cn')
    4442        all_groups = daProvider.get_all_groups()
    4543        for g in all_groups:
    46             users = daProvider.get_group_users(g[1][self.group_nameattr][0])
     44            users = daProvider.get_group_users(g[1][group_nameattr][0])
    4745            if len(users) == 0:
    4846                users.append("(nobody)")
    4947            for u in users:
    50                 filteredPermissions.append([u, "@%s" % g[1][self.group_nameattr][0]])
     48                filteredPermissions.append([u, "@%s" % g[1][group_nameattr][0]])
    5250        self.log.debug("permissions: %s", filteredPermissions)
    5351        return filteredPermissions

Attachments (1)

t13548.patch (1.6 KB) - added by Ryan J Ollos 3 years ago.

Download all attachments as: .zip

Change History (4)

Changed 3 years ago by Ryan J Ollos

Attachment: t13548.patch added

comment:1 Changed 3 years ago by Ryan J Ollos

Owner: changed from bebbo to Ryan J Ollos
Status: newaccepted

comment:2 Changed 3 years ago by Ryan J Ollos

Resolution: fixed
Status: acceptedclosed

In 17455:

Remove duplicated option

Fixes #13548.

Last edited 3 years ago by Ryan J Ollos (previous) (diff)

comment:3 Changed 3 years ago by anonymous

thanks :-)

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.