X-Git-Url: http://wagnertech.de/git?p=kivitendo-erp.git;a=blobdiff_plain;f=sql%2FPg-upgrade2-auth%2Fcustomer_vendor_record_extra_tab_rights.pl;fp=sql%2FPg-upgrade2-auth%2Fcustomer_vendor_record_extra_tab_rights.pl;h=4431a34fe84cbde5f692514c0bbabd38c87554fb;hp=0000000000000000000000000000000000000000;hb=53593baa211863fbf66540cf1bcc36c8fb37257f;hpb=deb4d2dbb676d7d6f69dfe7815d6e0cb09bd4a44 diff --git a/sql/Pg-upgrade2-auth/customer_vendor_record_extra_tab_rights.pl b/sql/Pg-upgrade2-auth/customer_vendor_record_extra_tab_rights.pl new file mode 100644 index 000000000..4431a34fe --- /dev/null +++ b/sql/Pg-upgrade2-auth/customer_vendor_record_extra_tab_rights.pl @@ -0,0 +1,32 @@ +# @tag: customer_vendor_record_extra_tab_rights +# @description: Setzt Rechte um bei Kunden/Lieferanten einen Extratab anzeigen zu lassen, der Belege anzeigt per Default erlaubt +# @depends: release_3_5_2 +# @locales: Show record tab in customer +# @locales: Show record tab in vendor +package SL::DBUpgrade2::Auth::customer_vendor_record_extra_tab_rights; + +use strict; +use utf8; + +use parent qw(SL::DBUpgrade2::Base); + +use SL::DBUtils; + +sub run { + my ($self) = @_; + + $self->db_query("INSERT INTO auth.master_rights (position, name, description) VALUES ( 610, 'show_extra_record_tab_customer', 'Show record tab in customer')"); + $self->db_query("INSERT INTO auth.master_rights (position, name, description) VALUES ( 611, 'show_extra_record_tab_vendor', 'Show record tab in vendor')"); + + my $groups = $main::auth->read_groups(); + + foreach my $group (values %{$groups}) { + $group->{rights}->{show_extra_record_tab_customer} = 1; + $group->{rights}->{show_extra_record_tab_vendor} = 1; + $main::auth->save_group($group); + } + + return 1; +} # end run + +1;