[Jifty-commit] r4831 - in jifty/trunk: lib/Jifty/Plugin/Authentication/Password lib/Jifty/Plugin/Authentication/Password/Mixin/Model

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Sat Jan 12 16:42:38 EST 2008


Author: jesse
Date: Sat Jan 12 16:42:38 2008
New Revision: 4831

Modified:
   jifty/trunk/   (props changed)
   jifty/trunk/lib/Jifty/Plugin/Authentication/Password/Dispatcher.pm
   jifty/trunk/lib/Jifty/Plugin/Authentication/Password/Mixin/Model/User.pm
   jifty/trunk/lib/Jifty/Plugin/Authentication/Password/View.pm

Log:
 r74890 at pinglin:  jesse | 2008-01-12 14:46:34 -0600
 * cleaning up some old templates
 * made not changing your password no longer a criminal offense
 * fixed a bug someone introduced that mistakenly set password to varchar(255)


Modified: jifty/trunk/lib/Jifty/Plugin/Authentication/Password/Dispatcher.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Plugin/Authentication/Password/Dispatcher.pm	(original)
+++ jifty/trunk/lib/Jifty/Plugin/Authentication/Password/Dispatcher.pm	Sat Jan 12 16:42:38 2008
@@ -46,7 +46,7 @@
 
 };
 
-=head2 on qr/^(?:passwordreminder|signup|lost_password)$/ 
+=head2 on qr/^(?:signup|lost_password)$/ 
 
 Redirect to home if logged.
 
@@ -54,7 +54,7 @@
 
 =cut
 
-before qr'^/(?:passwordreminder|signup|lost_password)$' => run {
+before qr'^/(?:signup|lost_password)$' => run {
     redirect('/') if ( Jifty->web->current_user->id );
     set 'next' => Jifty->web->request->continuation || Jifty::Continuation->new( request => Jifty::Request->new( path => "/login" ) );
 };

Modified: jifty/trunk/lib/Jifty/Plugin/Authentication/Password/Mixin/Model/User.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Plugin/Authentication/Password/Mixin/Model/User.pm	(original)
+++ jifty/trunk/lib/Jifty/Plugin/Authentication/Password/Mixin/Model/User.pm	Sat Jan 12 16:42:38 2008
@@ -58,8 +58,9 @@
 column password =>
   is unreadable,
   label is _('Password'),
-  type is 'varchar(255)',
-  max_length is 255,
+  type is 'varchar(32)',
+  max_length is 32,
+  lenght is 16,
   hints is _('Your password should be at least six characters'),
   render_as 'password',
   filters are 'Jifty::DBI::Filter::SaltHash';
@@ -134,7 +135,7 @@
     return 1 if $self->has_alternative_auth();
 
     return ( 0, _('Passwords need to be at least six characters long') )
-        if length($new_value) < 6;
+        if  length($new_value) && length($new_value) < 6;
 
     return 1;
 }

Modified: jifty/trunk/lib/Jifty/Plugin/Authentication/Password/View.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Plugin/Authentication/Password/View.pm	(original)
+++ jifty/trunk/lib/Jifty/Plugin/Authentication/Password/View.pm	Sat Jan 12 16:42:38 2008
@@ -105,10 +105,11 @@
 
 =cut
 
-template 'let/reset_lost_password' => page { title => 'Reset lost password' } content {
+template 'let/reset_lost_password' => page { title => _('Reset lost password') } content {
     my ( $next ) = get(qw(next));
     my $action = Jifty->web->new_action( class => 'ResetLostPassword' );
 
+    h1 { {class is 'title'};  _('Reset lost password')};
     Jifty->web->form->start( call => $next );
         render_param( $action => $_ ) for ( $action->argument_names );
         form_return( label => _("New password"), submit => $action );
@@ -143,6 +144,7 @@
         class   => 'SendPasswordReminder',
     );
 
+    h1 { {class is 'title'};  _('Send a link to reset your password')};
     outs( _(  "You lost your password. A link to reset it will be sent to the following email address:"));
     my $focused = 0;
     Jifty->web->form->start( call => $next );
@@ -152,35 +154,6 @@
 
 };
 
-=head2 passwordreminder
-
-Starts the process of sending a link to reset a lost password by email.
-
-See L<Jifty::Plugin::Authentication::Password::SendPasswordReminder>.
-
-=begin comment
-
-What's the difference between lost_password and passwordreminder? -- Sterling
-
-=end comment
-
-=cut
-
-template 'passwordreminder' => page { title => 'Send a password reminder' } content {
-    my $next = get('next');
-    my $action = Jifty->web->new_action(
-        moniker => 'password_reminder',
-        class   => 'SendPasswordReminder',
-    );
-    h2 { _('Send a password reminder') };
-    p  { _(  "You lost your password. A reminder will be send to the following mail:") };
-
-    Jifty->web->form->start( call => $next );
-        render_param( $action => $_ ) for ( $action->argument_names );
-        form_return( label => _("Send"), submit => $action);
-    Jifty->web->form->end();
-};
-
 =head2 resend_confirmation
 
 Request a new email confirmation message be sent to your email account.


More information about the Jifty-commit mailing list