aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Auth/Profile.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2019-10-23 18:20:28 +0100
committerMatthew Somerville <matthew@mysociety.org>2019-10-28 17:11:00 +0000
commitd551a1f6a7be39646e718683b14a572402e23981 (patch)
tree7c6129a7fe2adbf4123f58f6765bdccc3178892d /perllib/FixMyStreet/App/Controller/Auth/Profile.pm
parentdce115c18fcc3565176b0d65fe7a70926a8eb213 (diff)
Allow non-superusers to store 2FA secrets.
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Auth/Profile.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Auth/Profile.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Auth/Profile.pm b/perllib/FixMyStreet/App/Controller/Auth/Profile.pm
index 87aff2261..107720aee 100644
--- a/perllib/FixMyStreet/App/Controller/Auth/Profile.pm
+++ b/perllib/FixMyStreet/App/Controller/Auth/Profile.pm
@@ -191,7 +191,7 @@ sub generate_token : Path('/auth/generate_token') {
$c->stash->{token_generated} = 1;
}
- if ($c->get_param('toggle_2fa') && $c->user->is_superuser) {
+ if ($c->get_param('toggle_2fa')) {
if ($has_2fa) {
$c->user->unset_extra_metadata('2fa_secret');
$c->stash->{toggle_2fa_off} = 1;