aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Report/Update.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2018-02-02 08:52:58 +0000
committerMatthew Somerville <matthew-github@dracos.co.uk>2018-02-07 12:11:54 +0000
commitb4b6679f6aac821ac31e541e0cc6f05549b130b5 (patch)
tree9d5f1ab9ab3af93672c11b8cf8998f4cf0878631 /perllib/FixMyStreet/App/Controller/Report/Update.pm
parent3ec1e871a1a04cd1f6ce051d1a6247acf2220ac2 (diff)
Add two-factor authentication for superusers.
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Report/Update.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Report/Update.pm3
1 files changed, 3 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report/Update.pm b/perllib/FixMyStreet/App/Controller/Report/Update.pm
index c28039808..2f0ef8c0f 100644
--- a/perllib/FixMyStreet/App/Controller/Report/Update.pm
+++ b/perllib/FixMyStreet/App/Controller/Report/Update.pm
@@ -478,6 +478,9 @@ sub redirect_or_confirm_creation : Private {
return 1;
}
+ # Superusers using 2FA can not log in by code
+ $c->detach( '/page_error_403_access_denied', [] ) if $update->user->has_2fa;
+
my $data = $c->stash->{token_data};
$data->{id} = $update->id;
$data->{add_alert} = $c->get_param('add_alert') ? 1 : 0;