From a7541a181013378da0090da53847c882881825d0 Mon Sep 17 00:00:00 2001 From: Matthew Somerville Date: Mon, 1 Jun 2020 10:08:55 +0100 Subject: Add user_country call that uses Gaze. --- perllib/FixMyStreet/App.pm | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'perllib/FixMyStreet/App.pm') diff --git a/perllib/FixMyStreet/App.pm b/perllib/FixMyStreet/App.pm index 6a41d93a9..4ca6f23cb 100644 --- a/perllib/FixMyStreet/App.pm +++ b/perllib/FixMyStreet/App.pm @@ -536,6 +536,11 @@ sub check_2fa { return 0; } +sub user_country { + my $c = shift; + return FixMyStreet::Gaze::get_country_from_ip($c->req->address); +} + =head1 SEE ALSO L, L -- cgit v1.2.3 From 51eae76dd663d23c1f4bb1e809e9c258e800cb73 Mon Sep 17 00:00:00 2001 From: Matthew Somerville Date: Wed, 10 Jun 2020 14:29:35 +0100 Subject: Only show access tokens once, and store hashed. --- perllib/FixMyStreet/App.pm | 3 --- 1 file changed, 3 deletions(-) (limited to 'perllib/FixMyStreet/App.pm') diff --git a/perllib/FixMyStreet/App.pm b/perllib/FixMyStreet/App.pm index 4ca6f23cb..638fcc4e4 100644 --- a/perllib/FixMyStreet/App.pm +++ b/perllib/FixMyStreet/App.pm @@ -101,9 +101,6 @@ __PACKAGE__->config( use_session => 0, credential => { class => 'AccessToken', - token_field => 'extra', - # This means the token has to be 18 characters long (as generated by AuthToken) - token_lookup => { like => "%access_token,T18:TOKEN,%" }, }, store => $store, }, -- cgit v1.2.3 From 9292866fbc1be364a716ac9efb105a0350a2de72 Mon Sep 17 00:00:00 2001 From: M Somerville Date: Wed, 2 Sep 2020 16:30:57 +0100 Subject: Form wizard code. --- perllib/FixMyStreet/App.pm | 1 + 1 file changed, 1 insertion(+) (limited to 'perllib/FixMyStreet/App.pm') diff --git a/perllib/FixMyStreet/App.pm b/perllib/FixMyStreet/App.pm index 638fcc4e4..e367f0332 100644 --- a/perllib/FixMyStreet/App.pm +++ b/perllib/FixMyStreet/App.pm @@ -514,6 +514,7 @@ Sets the query parameter to the passed variable. sub set_param { my ($c, $param, $value) = @_; $c->req->params->{$param} = $value; + $c->req->body_params->{$param} = $value; } =head2 check_2fa -- cgit v1.2.3