From: Moritz Bunkus Date: Mon, 17 Jun 2013 08:17:50 +0000 (+0200) Subject: Neue Gruppenrechte richtig setzen X-Git-Tag: release-3.1.0beta1~327 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=d306aa8ce663a301ff4c7ec7dd61c7ff0211da51;p=kivitendo-erp.git Neue Gruppenrechte richtig setzen $::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. --- 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); }