Support LDAP email attribute

Review Request #652 — Created Nov. 30, 2008 and submitted

Information

eph
Review Board SVN (deprecated)

Reviewers

This is small patch which allows to specify LDAP attribute containing user's e-mail address instead of creating one as username@domain.

Just bear in mind that I never programmed in python and I just did this to be able to use RB at work :). I also tried to tidy it up a little bit (mainly the settings form) but failed. 

 
chipx86
  1. 
      
  2. trunk/reviewboard/accounts/backends.py (Diff revision 1)
     
     
     
     
    This can be condensed to an elif:
  3. trunk/reviewboard/admin/forms.py (Diff revision 1)
     
     
    This should be in title casing instead of sentence casing.
    1. Eh, not really sure what do you mean by that :)
  4. trunk/reviewboard/admin/forms.py (Diff revision 1)
     
     
    It seems really weird to say "Or ..." here. It would be especially confusing to translators. This should really stand alone. You may want to instead say how this takes precedence over the e-mail domain if available.
    
    Is the mail attribute standardized and available in all LDAP configs? If so, we may as well hard-code it. I honestly don't know enough about LDAP.
    1. Well, originally I wanted to put select field there but somehow could get it working properly. So this is just basic solution of my problem. I tried to rephrase so fell free to comment :)
      
      As for LDAP I don't think it is standardized attribute (I had to add it to our OpenLDAP) but AFAIK it's widely used. But I'm no LDAP expert either :)
  5. 
      
EP
Review request changed
chipx86
  1. 
      
  2. trunk/reviewboard/accounts/backends.py (Diff revision 2)
     
     
    I don't even think Python will accept this... Or the indentation on the next line. There's the extra colon, and the next line doesn't match the indentation of the rest.
  3. trunk/reviewboard/admin/forms.py (Diff revision 2)
     
     
    Make sure this wraps to ~76 characters or so. It must stay under 80. Also, "E-mail" in this one and the next.
  4. 
      
chipx86
  1. Went ahead and made the changes, and submitted as r1636. Thanks for your work on this.
  2. 
      
Loading...