anvc / scalar

Born-digital, open source, media-rich scholarly publishing that’s as easy as blogging.
Other
231 stars 73 forks source link

LDAP authentication option added #40

Closed ccc2lu closed 8 years ago

ccc2lu commented 8 years ago

I wrote this code so we could have our local scalar implementation at Lehigh University use LDAP to authenticate users. Hopefully it is okay to be included in the main scalar code so that other organizations could use it as well. By default, LDAP authentication is off and scalar authenticates users using its own database, as normal.

craigdietrich commented 8 years ago

Hi @ccc2lu, this is awesome, thanks!

I'll take a look in a moment, it shouldn't be a problem to put into the main trunk.

craigdietrich commented 8 years ago

@ccc2lu Sorry it took me so long to get to this merge!

craigdietrich commented 8 years ago

@ccc2lu I made a couple minor adjustments (e.g., moved the LDAP config down a little in local_settings, and changed 0 to false, 1 to true).

I'm hoping to get a new Scalar Release up in the next week or two ... I might wait until then before testing a new build, as there's a couple biggies pending in master.

Thanks!

ccc2lu commented 8 years ago

@craigdietrich Glad to hear the change made it in! One thing I thought of in looking back at the code -- it would probably be a good idea to put a comment mentioning the "pwgen" program that my code uses to generate a random password for Scalar user accounts created by the first login of a new LDAP user in the local_settings file, right above the use_ldap variable so people know they'll need that program installed and on the path of the user running Apache if they set use_ldap to true.

craigdietrich commented 8 years ago

@ccc2lu Sure! Do you want to just go ahead and make a pull request for this? (I promise I'll accept it quickly this time!)