liste yoneticisi wrote:
>
>But I am trying to understand the commands.
>I tried the text in the attachment also but as you warned, it didn't
>work.:-(
>
Yes, It had a few problems :(
>-----------------------------------
>>The final problem is you've inserted your code in the wrong place. You
>>put it where it is only reached if the user is already authenticated
>>or provided a valid authentication.
>-----------------------------------
>
>Actually if someone reached to the archive (in order to see attachments,
>messages for example) he probably had not logged into list archives
>page yet. He is asked to enter his e-mail and corresponding password.
My remark above referred to where in the logical flow of the private.py
module you had put your code. It was not about how a user would arrive
at the page.
Since I had planned to look into this for Mailman 2.2 anyway, I have
made a first cut at implementing this feature. The attached
privatepw.patch.txt contains patches to Mailman/Cgi/private.py and
templates/en/private.html to implement this feature. I have tested
them and they seem OK.
You're on your own for the Turkish version of the private.html template.
--
Mark Sapiro <[email protected]> The highway is for gamblers,
San Francisco Bay Area, California better use your sense - B. Dylan
=== modified file 'Mailman/Cgi/private.py'
--- Mailman/Cgi/private.py 2006-04-04 23:47:14 +0000
+++ Mailman/Cgi/private.py 2009-07-23 21:02:00 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 1998-2006 by the Free Software Foundation, Inc.
+# Copyright (C) 1998-2009 by the Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -131,6 +131,27 @@
if cgidata.has_key('submit'):
# This is a re-authorization attempt
message = Bold(FontSize('+1', _('Authorization failed.'))).Format()
+ # Are we processing a password reminder from the login screen?
+ if cgidata.has_key('login-remind'):
+ if username:
+ message = Bold(FontSize('+1', _("""If you are a list member,
+ your password has been emailed to you."""))).Format()
+ else:
+ message = Bold(FontSize('+1',
+ _('Please enter your email address'))).Format()
+ if mlist.isMember(username):
+ mlist.MailUserPassword(username)
+ elif username:
+ # Not a member
+ if mlist.private_roster == 0:
+ # Public rosters
+ safeuser = Utils.websafe(username)
+ message = Bold(FontSize('+1',
+ _('No such member: %(safeuser)s.'))).Format()
+ else:
+ syslog('mischief',
+ 'Reminder attempt of non-member w/ private rosters: %s',
+ username)
# Output the password form
charset = Utils.GetCharSet(mlist.preferred_language)
print 'Content-type: text/html; charset=' + charset + '\n\n'
=== modified file 'templates/en/private.html'
--- templates/en/private.html 2005-12-12 00:58:15 +0000
+++ templates/en/private.html 2009-07-23 20:56:09 +0000
@@ -38,6 +38,21 @@
you can explicitly expire the cookie by visiting your
member options page and clicking the
<em>Log out</em> button.
+ <p>
+ <TABLE WIDTH="100%%" BORDER="0" CELLSPACING="4" CELLPADDING="5">
+ <TR>
+ <TD COLSPAN="2" WIDTH="100%%" BGCOLOR="#99CCFF" ALIGN="CENTER">
+ <B><FONT COLOR="#000000" SIZE="+1">Password Reminder</FONT></B>
+ </TD>
+ </TR>
+ <tr>
+ <td>If you don't remember your password, enter your email address
+ above and click the <em>Remind</em> button and your
+ password will be emailed to you.</td>
+ </tr>
+ <tr>
+ <td><center><INPUT name="login-remind" type="SUBMIT" value="Remind"
></center></td>
+ </tr>
</FORM>
</body>
</html>
------------------------------------------------------
Mailman-Users mailing list
[email protected]
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe:
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org
Security Policy: http://wiki.list.org/x/QIA9