aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdmund von der Burg <evdb@mysociety.org>2011-03-24 12:40:49 +0000
committerEdmund von der Burg <evdb@mysociety.org>2011-03-24 12:40:49 +0000
commitd839ff45d1bbbb65d2e1faac1a6a62a955aabb54 (patch)
tree0b2696892f95ec9da74a689a1b306636bbee8a96
parent237fff72cf2b574ae8d19e9e2596ea93e08fcfc6 (diff)
auth related fixes
-rw-r--r--perllib/FixMyStreet/App/Controller/Auth.pm7
-rw-r--r--perllib/FixMyStreet/App/Controller/Reports/New.pm2
-rw-r--r--templates/web/default/auth/general.html2
3 files changed, 8 insertions, 3 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Auth.pm b/perllib/FixMyStreet/App/Controller/Auth.pm
index 3d60172cf..16f0b994c 100644
--- a/perllib/FixMyStreet/App/Controller/Auth.pm
+++ b/perllib/FixMyStreet/App/Controller/Auth.pm
@@ -155,7 +155,12 @@ Let the user change their password.
sub change_password : Local {
my ( $self, $c ) = @_;
- # FIXME - should be logged in
+ # FIXME - handle not being logged in more elegantly
+ unless ( $c->user ) {
+ $c->res->redirect( $c->uri_for('/auth') );
+ $c->detach;
+ }
+
# FIXME - CSRF check here
# FIXME - minimum criteria for passwords (length, contain number, etc)
diff --git a/perllib/FixMyStreet/App/Controller/Reports/New.pm b/perllib/FixMyStreet/App/Controller/Reports/New.pm
index 20fb24a32..14e3d8c9a 100644
--- a/perllib/FixMyStreet/App/Controller/Reports/New.pm
+++ b/perllib/FixMyStreet/App/Controller/Reports/New.pm
@@ -478,7 +478,7 @@ sub process_report : Private {
'title', 'detail', 'pc', #
'name', 'may_show_name', #
'category', #
- 'partial', 'skipped', 'upload_fileid', #
+ 'partial', 'skipped', #
);
# create a new report, but don't save it yet
diff --git a/templates/web/default/auth/general.html b/templates/web/default/auth/general.html
index 44f203193..e0d516cbd 100644
--- a/templates/web/default/auth/general.html
+++ b/templates/web/default/auth/general.html
@@ -1,4 +1,4 @@
-[% INCLUDE 'header.html', title => loc('About Us') %]
+[% INCLUDE 'header.html', title => loc('Login or create an account') %]
<h1>[% loc('Login or create an account') %]</h1>