changes required in
TWikiUserMappings.pm required to support registration in case
PasswordManager is
LdapUser
--
TWiki:Main/SopanShewale - 01 Dec 2008
Outch
--
TWiki:Main.MichaelDaum - 01 Dec 2008
For those wondering why this enhancement is needed:
The current
LdapContrib does not support local user registration in TWiki. This is because the LDAP password is declared as read only, so TWiki disables user registration.
It is possible however to register users with these configure settings:
$TWiki::cfg{UserMappingManager} = 'TWiki::Users::TWikiUserMapping';
$TWiki::cfg{PasswordManager} = 'TWiki::Users::LdapUser
and this patch in
twiki/lib/TWiki/Users/TWikiUserMapping.pm
:
[root@twiki Users]# diff -u TWikiUserMapping.pm.save1 TWikiUserMapping.pm
--- TWikiUserMapping.pm.save1 2008-10-24 21:22:46.000000000 -0400
+++ TWikiUserMapping.pm 2008-11-14 13:49:51.000000000 -0500
@@ -74,7 +74,7 @@
#if password manager says sorry, we're read only today
#'none' is a special case, as it means we're not actually using the password manager for
# registration.
- if ($this->{passwords}->readOnly() && ($TWiki::cfg{PasswordManager} ne 'none')) {
+ if ($this->{passwords}->readOnly() && ($TWiki::cfg{PasswordManager} !~ /^(none|TWiki::Users::LdapUser)$/)) {
$session->writeWarning( 'TWikiUserMapping has TURNED OFF EnableNewUserRegistration, because the password file is read only.' );
$TWiki::cfg{Register}{EnableNewUserRegistration} = 0;
}
@@ -284,7 +284,7 @@
'New password did not match existing password for this user');
}
# User exists, and the password was good.
- } else {
+ } elsif( $TWiki::cfg{PasswordManager} ne 'TWiki::Users::LdapUser' ) {
# add a new user
unless( defined( $password )) {
--
TWiki:Main.PeterThoeny - 01 Dec 2008
Closing After Release 4.2.4
--
SopanShewale - 11 Dec 2008