[prev] [thread] [next] [lurker] [Date index for 2003/12/3]
Author: gabor
Date: 2003-12-03 00:43:49 +0200 (Wed, 03 Dec 2003)
New Revision: 104
Modified:
yapcom/trunk/README
yapcom/trunk/lib/YAPC/Organizer.pm
yapcom/trunk/t/03-web-adduser.t
Log:
fix timeline error after login
Modified: yapcom/trunk/README
===================================================================
--- yapcom/trunk/README 2003-12-02 21:04:16 UTC (rev 103)
+++ yapcom/trunk/README 2003-12-02 22:43:49 UTC (rev 104)
@@ -57,8 +57,15 @@
---------
0.09_01 2003.11.
- show more information about the registered people
+ - After anadministrator logs in s/he gets back a regular MyYAPC page without the extra
+ link. Only after pressing the 'Personal Inoramtion' link (login.html) do these links
+ show up.
+ - In I think related issue, if regular user tries to access the proposal.html page
+ then she gets login. One se logs in she gets a Timeline error even though the URL
+ in the navigation bar seem to be correct.
+
0.09 2003.11.27
- create XML compilant HTML pages
- enable logged in users to change their proposals
@@ -279,14 +286,7 @@
test has to run 10 times to have good chances to one corruption)
so we can see when our script is good enough ?
- After anadministrator logs in s/he gets back a regular MyYAPC page without the extra
- link. Only after pressing the 'Personal Inoramtion' link (login.html) do these links
- show up.
- In I think related issue, if regular user tries to access the proposal.html page
- then she gets login. One se logs in she gets a Timeline error even though the URL
- in the navigation bar seem to be correct.
-
there are more bugs listed in the TODO list.
Modified: yapcom/trunk/lib/YAPC/Organizer.pm
===================================================================
--- yapcom/trunk/lib/YAPC/Organizer.pm 2003-12-02 21:04:16 UTC (rev 103)
+++ yapcom/trunk/lib/YAPC/Organizer.pm 2003-12-02 22:43:49 UTC (rev 104)
@@ -77,7 +77,7 @@
}
}
else {
- $self->param('yapcom_next_page' => "$page.html") if $page ne 'logout';
+ $self->param('yapcom_next_page' => $page) if $page ne 'logout';
$self->prerun_mode('login');
}
return;
@@ -115,9 +115,10 @@
# maybe this should be replaced with a generic show page call
sub user_account {
my $self = shift;
+ my $id = shift;
my $t = $self->_server_page('user_account');
- my $id = $self->is_logged_in();
+ $id = $self->is_logged_in() if not $id;
my $admin = $self->is_admin_user($id);
if ($admin) {
$t->param(ADMIN => 1);
@@ -429,7 +430,11 @@
);
$self->header_props(-cookie => $cookie);
- my $page = $q->param("next") || 'user_account';
+ my $page = $q->param("next");
+ $self->query->param(submit => 0);
+ if (not $page) {
+ return $self->user_account($login->user_id);
+ }
if (grep {$_ eq $page} @run_modes) {
return $self->$page;
}
Modified: yapcom/trunk/t/03-web-adduser.t
===================================================================
--- yapcom/trunk/t/03-web-adduser.t 2003-12-02 21:04:16 UTC (rev 103)
+++ yapcom/trunk/t/03-web-adduser.t 2003-12-02 22:43:49 UTC (rev 104)
@@ -317,14 +317,14 @@
}
####### accessing the proposal page without logging in first
-####### leads us to the login page with next=proposal.html set
+####### leads us to the login page with next=proposal set
{
local $ENV{REQUEST_URI} = '/proposal.html';
my $webapp = YAPC::Organizer->new;
$webapp->query();
my $result = $webapp->run();
like($result, qr/<h2>Login<\/h2>/, 'Login page received');
- like($result, qr@<input type="hidden" name="next" value="proposal.html" />@, 'next set to proposal.html');
+ like($result, qr@<input type="hidden" name="next" value="proposal" />@, 'next set to proposal.html');
}
####### accessing the user account page without logging in first
@@ -335,7 +335,7 @@
$webapp->query();
my $result = $webapp->run();
like($result, qr/<h2>Login<\/h2>/, 'Login page received');
- like($result, qr@<input type="hidden" name="next" value="user_account.html" />@, 'next set to user_account.html');
+ like($result, qr@<input type="hidden" name="next" value="user_account" />@, 'next set to user_account.html');
}
####### accessing the proposal page after logging in
@@ -358,7 +358,7 @@
$webapp->query($q);
my $result = $webapp->run();
like($result, qr@<h2>Login</h2>@, 'Login page received');
- like($result, qr@<input type="hidden" name="next" value="proposal.html" />@, 'next set to proposal.html');
+ like($result, qr@<input type="hidden" name="next" value="proposal" />@, 'next set to proposal.html');
}
###### accessing the login page when the users is logged in should bring up the My YAPC page
@@ -403,7 +403,7 @@
$webapp->query();
my $result = $webapp->run();
like($result, qr/<h2>Login<\/h2>/, 'Login page received');
- like($result, qr@<input type="hidden" name="next" value="proposal.html" />@, 'next set to proposal.html');
+ like($result, qr@<input type="hidden" name="next" value="proposal" />@, 'next set to proposal.html');
}
####### accessing the proposal page after logging in, from the other browser
Generated at 02:15 on 03 Dec 2003 by mariachi 0.51