From 432efb24aa2e672c523cf88123e2229ddda813e5 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 Content-Type: text/plain; charset=utf-8 Signed-off-by: Marcel de Rooy --- 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.20.1