• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item6135: changes required in TWikiUserMappings.pm required to support registration in case PasswordManager is LdapUser

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Extension TWikiUserMappingContrib Normal Closed   n/a 4.2.4, 5.0.0

Edit Form Data

Summary:
Reported By:
Codebase:
Applies To:
Component:
Priority:
Current State:
Waiting For:
Target Release:
Released In:
 

Detail

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

ItemTemplate
Summary changes required in TWikiUserMappings.pm required to support registration in case PasswordManager is LdapUser
ReportedBy TWiki:Main.SopanShewale
Codebase 4.2.2
SVN Range TWiki-5.0.0, Wed, 22 Oct 2008, build 17677
AppliesTo Extension
Component TWikiUserMappingContrib
Priority Normal
CurrentState Closed
WaitingFor

Checkins TWikirev:17740
TargetRelease n/a
ReleasedIn 4.2.4, 5.0.0
Edit | Attach | Watch | Print version | History: r7 < r6 < r5 < r4 < r3 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r7 - 2008-12-11 - SopanShewale
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback