From d306aa8ce663a301ff4c7ec7dd61c7ff0211da51 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Mon, 17 Jun 2013 10:17:50 +0200 Subject: [PATCH] Neue Gruppenrechte richtig setzen MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit $::auth->read_groups setzt für jedes im Quellcode bekannte Recht einen $::auth->Wert in $group->{rights}; für nicht in der DB vorhandene $::auth->schlicht 0. Daher greift das "if !defined ..." nie. --- sql/Pg-upgrade2-auth/productivity_rights.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sql/Pg-upgrade2-auth/productivity_rights.pl b/sql/Pg-upgrade2-auth/productivity_rights.pl index 4dd0270da..4c97c265b 100644 --- a/sql/Pg-upgrade2-auth/productivity_rights.pl +++ b/sql/Pg-upgrade2-auth/productivity_rights.pl @@ -16,8 +16,8 @@ sub run { my $groups = $main::auth->read_groups(); foreach my $group (values %{$groups}) { - $group->{rights}->{productivity} = 1 unless defined $group->{rights}->{productivity}; - $group->{rights}->{display_admin_link} = 1 unless defined $group->{rights}->{display_admin_link}; + $group->{rights}->{productivity} = 1; + $group->{rights}->{display_admin_link} = 1; $main::auth->save_group($group); } -- 2.20.1