From c98b623313122618e53f9a2c77701d0a602d0c4f Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 28 Jul 2022 10:05:03 +0200 Subject: [PATCH] Bug 30588: Add missing atomic update Signed-off-by: Nick Clemens Signed-off-by: Tomas Cohen Arazi --- installer/data/mysql/atomicupdate/bug_30588.pl | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 installer/data/mysql/atomicupdate/bug_30588.pl diff --git a/installer/data/mysql/atomicupdate/bug_30588.pl b/installer/data/mysql/atomicupdate/bug_30588.pl new file mode 100755 index 0000000000..58f46a77ed --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_30588.pl @@ -0,0 +1,17 @@ +use Modern::Perl; + +return { + bug_number => "30588", + description => "Add an 'enforce' option for TwoFactorAuthentication", + up => sub { + my ($args) = @_; + my ($dbh, $out) = @$args{qw(dbh out)}; + $dbh->do(q{ + UPDATE systempreferences + SET options="enforced|enabled|disabled", + value=CASE value WHEN '1' THEN 'enabled' ELSE 'disabled' END, + type="Choice" + WHERE variable="TwoFactorAuthentication" + }); + }, +}; -- 2.39.5