Modify

Opened 11 years ago

Closed 7 years ago

#10673 closed enhancement (worksforme)

Configuring dir_scope

Reported by: myingling Owned by: branson
Priority: normal Component: DirectoryAuthPlugin
Severity: normal Keywords:
Cc: Trac Release: 1.0

Description

I was about to give up on this plugin until I discovered the dir_scope option. It's mentioned in the source but not (currently) in the configuration example. It defaults to 1, but for some reason that never allowed users to be found in my schema. I set it to 2, which started working, but I had to patch the code. I kept getting errors about requiring integers instead of unicode, so I wrapped each use of scope inside _dir_search with int(). (r12025 of auth.py) This finally allowed my users to be authenticated, and group permissions are working too (at lead the TRAC_ADMIN group). I've been looking for this functionality for a long time, so thank you!

The source documents dir_scope to have values of 0, 1, 2, which correspond in theory to the LDAP Python module's ldap.SCOPE_BASE, ldap.SCOPE_ONELEVEL, ldap.SCOPE_SUBTREE. While those values are unlikely to change, perhaps a lookup from the number values to the ldap module constants would guarantee future compatibility better than just passing the raw numbers in?

Attachments (0)

Change History (4)

comment:1 Changed 11 years ago by kyle.james.oconnor@…

Partially a duplicate of #10581 which was fixed in [12963] but the recommendation in the 2nd paragraph about mapping to ldap enums instead should probably be done. I guess this is called PatchWelcome, right?

comment:2 Changed 9 years ago by bebbo

Type: defectenhancement

comment:3 Changed 7 years ago by anonymous

since the values are indeed not changing since the values are defined in the RFC and it's working as intended, this ticket can be closed.

comment:4 Changed 7 years ago by bebbo

Resolution: worksforme
Status: newclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain branson.
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.