From: Niclas Zimmermann Date: Thu, 13 Jun 2013 08:15:47 +0000 (+0200) Subject: Verschiebung von Upgrade-Script X-Git-Tag: release-3.1.0beta1~338 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=578f4adc392232723291b363c13ad618670df80e;p=kivitendo-erp.git Verschiebung von Upgrade-Script Upgrade-Script für das Setzen von Nutzerrechten befindet sich jetzt im Ordner Pg-Upgrade2-auth anstatt im Order Pg-Upgrade2. --- diff --git a/sql/Pg-upgrade2-auth/productivity_rights.pl b/sql/Pg-upgrade2-auth/productivity_rights.pl new file mode 100644 index 000000000..4dd0270da --- /dev/null +++ b/sql/Pg-upgrade2-auth/productivity_rights.pl @@ -0,0 +1,27 @@ +# @tag: productivity_rights +# @description: Setzt das Recht die Produktivität einzusehen und das Recht den Link zum Admin-Menü anzuzeigen wieder wie vorher +# @depends: release_3_0_0 +package SL::DBUpgrade2::productivity_rights; + +use strict; +use utf8; + +use parent qw(SL::DBUpgrade2::Base); + +use SL::DBUtils; + +sub run { + my ($self) = @_; + + 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}; + $main::auth->save_group($group); + } + + return 1; +} # end run + +1;