From: Werner Hahn Date: Sat, 30 Sep 2017 13:10:24 +0000 (+0200) Subject: WebshopApi: Recht Shoperstellen und bearbeiten in richtige Kategorie und X-Git-Tag: release-3.5.4~746 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=226f490b59e7d6920ac7b38c911bb1c3dfc311e2;p=kivitendo-erp.git WebshopApi: Recht Shoperstellen und bearbeiten in richtige Kategorie und englische Übersetzungen --- diff --git a/locale/en/all b/locale/en/all index 379f94d76..efa2072b3 100644 --- a/locale/en/all +++ b/locale/en/all @@ -711,7 +711,9 @@ $self->{texts} = { 'Create and edit sales delivery orders' => '', 'Create and edit sales orders' => '', 'Create and edit sales quotations' => '', + 'Create and edit shopparts' => 'Create and edit the parts assigned to a web shop', 'Create and edit vendor invoices' => '', + 'Create and edit webshops' => '', 'Create and print all invoices' => '', 'Create and print invoices' => '', 'Create and print invoices for all delivery orders matching the filter' => '', @@ -1451,6 +1453,7 @@ $self->{texts} = { 'Generate and print sales delivery orders' => '', 'Generic Tax Report' => '', 'Germany' => '', + 'Get shoporders' => 'Get and process orders from a web shop', 'Git revision: #1, #2 #3' => '', 'Given Name' => '', 'Gldate' => 'Entry Date', @@ -3839,8 +3842,6 @@ $self->{texts} = { 'correction' => '', 'correction_br' => 'correction', 'cp_greeting to cp_gender migration' => '', - 'create and edit shopparts' => '', - 'create and edit webshops' => '', 'customer' => '', 'customer_list' => '', 'dated' => '', @@ -3891,7 +3892,6 @@ $self->{texts} = { 'general_ledger_list' => '', 'generate cb/ob transactions for selected charts' => '', 'generated Files' => '', - 'get shoporders' => '', 'gobd-#1-#2.zip' => '', 'h' => '', 'history search engine' => '', diff --git a/sql/Pg-upgrade2-auth/webshop_api_rights_2.pl b/sql/Pg-upgrade2-auth/webshop_api_rights_2.pl new file mode 100644 index 000000000..3f476a554 --- /dev/null +++ b/sql/Pg-upgrade2-auth/webshop_api_rights_2.pl @@ -0,0 +1,30 @@ +# @tag: webshop_api_rights_2 +# @description: Setzt die Rechte Shopconfig, Shopbestellungen, Shopartikel, per Default nicht erlaubt +# @depends: webshop_api_rights +package SL::DBUpgrade2::Auth::webshop_api_rights_2; + +use strict; +use utf8; + +use parent qw(SL::DBUpgrade2::Base); + +use SL::DBUtils; + +sub run { + my ($self) = @_; + + $self->db_query("UPDATE auth.master_rights SET position = 4250 WHERE name = 'edit_shop_config'"); + + my $groups = $main::auth->read_groups(); + + foreach my $group (values %{$groups}) { + $group->{rights}->{shop_part_edit} = 0; + $group->{rights}->{shop_order} = 0; + $group->{rights}->{edit_shop_config} = 0; + $main::auth->save_group($group); + } + + return 1; +} # end run + +1;