Hi Eric, >> Our DSpace server has LDAP and Password authentication enabled. Is >> there an easy way to modify the Manakin Reference theme's "login" >> links to point directly to http://server/ldap-login rather than the >> login chooser at http://server/login? I need to leave password >> authentication enabled on the system, but I'm trying to simplify login >> for general users who will all use LDAP. This way, general users can >> click the "login" link for LDAP, and administrators can manually type >> the URL for Password login.
You'll need to edit a couple of files: sitemap.xmap, look for: <map:match pattern="login"> <map:select type="AuthenticationCountSelector"> <map:when test="0"> <map:transform type="Include" src="noAuthMethod.xml" /> <map:serialize type="xml"/> </map:when> <map:when test="1"> <map:act type="LoginRedirect" /> </map:when> <map:otherwise> <map:transform type="LoginChooser"/> <map:serialize type="xml"/> </map:otherwise> </map:select> <map:serialize type="xml"/> </map:match> You'll probably want to remove the 'when test="1"' clause and replace the content of the 'otherwise' clause with the content of the 'when test="1"'. This will then use the LoginRedirect class to always redirect the user rather than presenting the login chooser to the user. I've not tried it, so you might find this is enough because password and LDAP authN both use a similar login form, and once the user has entered their credentials DSpace tries each authN method in turn (irrespective of which one the user selected) until one accepts the credentials. If it isn't enough, then you'll need to edit org.dspace.app.xmlui.aspect.eperson.LoginRedirect.java: final String url = ((AuthenticationMethod) authMethods.next()) .loginPageURL(ContextUtil.obtainContext(objectModel), httpRequest, httpResponse); This can be changed to something like: final String url = "/xmlui/ldap-login"; This will mean all authN methods redirect to the LDAP login screen. Hope this helps, Stuart _________________________________________________________________ Gwasanaethau Gwybodaeth Information Services Prifysgol Aberystwyth Aberystwyth University E-bost / E-mail: stuart.le...@aber.ac.uk Ffon / Tel: (01970) 622860 _________________________________________________________________ ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword _______________________________________________ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech