Bug #65

Support LDAP schemes with no mail attribute

Added by Andreas Schröder almost 10 years ago. Updated almost 10 years ago.

Status:FixedStart date:
Priority:NormalDue date:
Assignee:Andreas Schröder% Done:

0%

Category:DrQueueOnRails
Target version:0.64.4

Description

from zzzmaestro:

If an LDAP user exists, but the profile is not setup in the database, line 83 of app/models/profile.rb wants a mail= from my filtered LDAP result. I don't have a mail attribute on my users. The manager that I'm using doesn't allow me to add that attribute. So - I changed config/environment.rb so that it looks like below:

ENV['LDAP_FILTER'] ||= "uid"
ENV['LDAP_ATTRS'] ||= "cn"

(I took out the mail ATTR). Seemed logical. Only problem was - then it tried to still SET myprofile.email on line 67 of app/models/profile.rb.

myprofile.email = entry.mail.to_s.chars

Conclusion:
only call entry.mail IF that is an ATTR in the config/environment.rb

History

#1 Updated by Andreas Schröder almost 10 years ago

  • Status changed from New to In progress

#2 Updated by Andreas Schröder almost 10 years ago

  • Status changed from In progress to Fixed
  • Resolution set to fixed

Also available in: Atom PDF