From: Dylan William Hardison Date: Thu, 6 Dec 2018 18:50:26 +0000 (-0500) Subject: Bug 1511466 - The /api/user/profile API should provide the user's MFA status X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6b274761e26d8332c51d5e360ba30ae9afceee9c;p=thirdparty%2Fbugzilla.git Bug 1511466 - The /api/user/profile API should provide the user's MFA status --- diff --git a/Bugzilla/Quantum/API.pm b/Bugzilla/Quantum/API.pm index 929347f47..89a33a5d3 100644 --- a/Bugzilla/Quantum/API.pm +++ b/Bugzilla/Quantum/API.pm @@ -8,6 +8,7 @@ package Bugzilla::Quantum::API; use 5.10.1; use Mojo::Base qw( Mojolicious::Controller ); +use Mojo::JSON qw( true false ); sub setup_routes { my ($class, $r) = @_; @@ -26,6 +27,8 @@ sub user_profile { login => $user->login, nick => $user->nick, groups => [map { $_->name } @{$user->groups}], + mfa => $user->mfa, + mfa_required_by_group => $user->in_mfa_group ? true : false, } ); }