[Jifty-commit] r2958 - in jifty/trunk: .
lib/Jifty/Plugin/Authentication/Password
lib/Jifty/Plugin/Authentication/Password/Action
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Tue Mar 13 23:11:36 EDT 2007
Author: jesse
Date: Tue Mar 13 23:11:36 2007
New Revision: 2958
Added:
jifty/trunk/t/TestApp-Plugin-PasswordAuth/lib/TestApp/Plugin/PasswordAuth/Dispatcher.pm
Modified:
jifty/trunk/ (props changed)
jifty/trunk/lib/Jifty/Plugin/Authentication/Password/Action/Login.pm
jifty/trunk/lib/Jifty/Plugin/Authentication/Password/Dispatcher.pm
jifty/trunk/lib/Jifty/Plugin/Authentication/Password/View.pm
Log:
r53380 at pinglin: jesse | 2007-03-13 22:48:24 -0400
* More work on the password auth plugin
Modified: jifty/trunk/lib/Jifty/Plugin/Authentication/Password/Action/Login.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Plugin/Authentication/Password/Action/Login.pm (original)
+++ jifty/trunk/lib/Jifty/Plugin/Authentication/Password/Action/Login.pm Tue Mar 13 23:11:36 2007
@@ -60,7 +60,6 @@
my $u = Jifty->app_class('Model', 'User')->new(current_user => Jifty->app_class('CurrentUser')->superuser);
$u->load_by_cols( email => $email );
- warn "Loaded $u with ".$email;
return $self->validation_error(email => 'We do not have an account that matches that email.') unless ($u->id);
return $self->validation_ok('email');
@@ -132,7 +131,6 @@
sub take_action {
my $self = shift;
- warn "1";
my $user = Jifty->app_class('Model', 'User')->new(current_user => Jifty->app_class('CurrentUser')->superuser);
$user->load_by_cols( email => $self->argument_value('email') );
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 Tue Mar 13 23:11:36 2007
@@ -14,7 +14,7 @@
# Make sure tangents work
# Before password reminders, login or signup, let's push the user off to the homepage if they're logged in
-on '*' => run {
+before '*' => run {
if ( Jifty->web->current_user->id ) {
logged_in_nav();
} else {
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 Tue Mar 13 23:11:36 2007
@@ -17,6 +17,15 @@
use HTML::Entities ();
use Jifty::View::Declare -base;
+{ no warnings 'redefine';
+sub page (&) {
+ no strict 'refs';
+ BEGIN {Jifty::Util->require(Jifty->app_class('View'))};
+ &{Jifty->app_class('View') . "::page"}(@_);
+}
+}
+
+
template 'signup' => page {
title is 'Signup';
my ( $action, $next ) = get(qw(action next));
Added: jifty/trunk/t/TestApp-Plugin-PasswordAuth/lib/TestApp/Plugin/PasswordAuth/Dispatcher.pm
==============================================================================
--- (empty file)
+++ jifty/trunk/t/TestApp-Plugin-PasswordAuth/lib/TestApp/Plugin/PasswordAuth/Dispatcher.pm Tue Mar 13 23:11:36 2007
@@ -0,0 +1,7 @@
+use strict;
+use warnings;
+package TestApp::Plugin::PasswordAuth::Dispatcher;
+use Jifty::Dispatcher -base;
+
+
+1;
More information about the Jifty-commit
mailing list