Ldap Authenticated Twiki Modifications
When you switch to Ldap authentication, you probably also want to change TWiki in some other ways, like:
- remove the possibility to use TWikiRegistration and change its text to something indicating that Ldap is used
- remove the functionality for ResetPassword and ChangePassword
- change to text on the TWiki TemplateLogin screen
This topic list some of the steps you could make to adapt TWiki reflect Ldap authentication. It is probably not a definite list and there may be much better, smarter or prettier ways of doing this. Please add your ideas and solutions to this topic!
Go to each of hte above topics. Now is the time to use the
backlinks functionality in the action bar at the bottom of these TWiki pages. It lists which topics are linking to them. Take care of the topics where your users are likely to arrive at some point (eg:
TWikiUsers which points to UserListBy topics).
Removing link to TWikiRegistration in the WebLeftBar
The
WebLeftBar includes the topic
WebLeftBarLogin. Just edit the
WebLeftBar topic and you'll see the include. To remove the link to the registration page, I've created a new topic WebLeftBarLdapLogin and included that topic instead. The contents of this WebLeftBarLdapLogin are as follows:
%STARTINCLUDE%<div class="patternLeftBarPersonal">
%IF{"context authenticated" then='%MAKETEXT{"Hello [_1]" args="[[%WIKIUSERNAME%][%SPACEOUT{%WIKINAME%}%]]"}%'}%%IF{"$ LOGOUT != ''" then='%BR%<ul><li class="patternLogOut">%LOGOUT%</li></ul>'}%%IF{"$ LOGIN != '' and not context authenticated" then='<ul><li class="patternLogIn">%LOGIN%</li></ul>'}%
<div class="patternLeftBarPersonalContent">%INCLUDE{"%MAINWEB%.%WIKINAME%LeftBar" warn="<ul><li><a href=\"%SCRIPTURLPATH{"edit"}%/%MAINWEB%/%WIKINAME%LeftBar?templatetopic=%TWIKIWEB%.WebLeftBarPersonalTemplate&topicparent=%WIKINAME%\">%MAKETEXT{"Create personal sidebar"}%</a></li></ul>"}%</div></div>
Changing text in the TemplateLogin screen
For the last thing, I created a skin file in /templates, called login.ldapchanges.tmpl, which contains:
%TMPL:INCLUDE{"login"}%
%TMPL:DEF{"authenticationnote"}%<p><span class="twikiSmallish twikiGrayText">%MAKETEXT{"Enter your login name and password. (Typically your standard company login name and password). Contact %WIKIWEBMASTER% if you do not succeed."}%</span></p>%TMPL:END%
%TMPL:DEF{"forgotpasswordnote"}%%TMPL:END%
The 'forgot password' link is cleared, since TWiki does not know this password. To activite this skin, go to
TWikiPreferences and find your skin definition:
* Set SKIN=pattern
Of course, in your case there may be other skins defined like natskin, or you might not have a SKIN setting at all. In any case, make sure you end up with something like this:
* Set SKIN=ldapchanges,pattern
So, put the new skin
before the skins that are already there. If you had to
create the SKIN definition, make sure that your default skin (e.g. pattern) is listed as well! This should take care of the text in the Login screen.
Discussion
Hope this helps! Please leave comments or change the text above directly.
--
JosMaccabiani - 04 Jun 2007
I havent yet looked at any of the Ldap plugins, but it would be useful if we could use Ldap and still have users home pages. Is that already possible with one of these plugins?
--
AndrewRJones - 05 Jun 2007
Adrew, have a look at the
NewUserPlugin.
--
MichaelDaum - 05 Jun 2007
Works ok corfirmed.
Many thanks for the tuto!
--
AlexandreTrofimov - 12 Jun 2007
What happened to the tags on this page? Would be nice to tag this with 'ldap'.
--
AndrewRJones - 27 Jul 2007
I have exactly followed the details of "Changing text in the
TemplateLogin screen" but cannot get it to work with TWiki version 4.2.3!? Should it work? Thanks.
(Other ldap stuff is great!)
--
GarryFerguson - 08 Dec 2008