aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Auth/Profile.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2019-10-24 10:40:49 +0100
committerMatthew Somerville <matthew@mysociety.org>2019-10-30 15:16:02 +0000
commit5a3e4c05be9e8eb931fccbcf6499abcc1da8d903 (patch)
tree3d6f4538275c5c9b0fa6b5c77dad870eeb3311bf /perllib/FixMyStreet/App/Controller/Auth/Profile.pm
parente8adf97e7f01efdaab2f0ab3181268d07640c3f4 (diff)
Allow enforcement of 2FA for staff users.
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Auth/Profile.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Auth/Profile.pm1
1 files changed, 1 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Auth/Profile.pm b/perllib/FixMyStreet/App/Controller/Auth/Profile.pm
index 8512e7562..91ffac205 100644
--- a/perllib/FixMyStreet/App/Controller/Auth/Profile.pm
+++ b/perllib/FixMyStreet/App/Controller/Auth/Profile.pm
@@ -195,6 +195,7 @@ sub generate_token : Path('/auth/generate_token') {
my $action = $c->get_param('2fa_action') || '';
$action = 'deactivate' if $c->get_param('2fa_deactivate');
$action = 'activate' if $c->get_param('2fa_activate');
+ $action = 'activate' if $action eq 'deactivate' && $has_2fa && $c->cobrand->call_hook('must_have_2fa', $c->user);
my $secret;
if ($action eq 'deactivate') {