From: Martin Helmling martin.helmling@octosoft.eu Date: Fri, 14 Oct 2016 12:57:52 +0000 (+0200) Subject: Verteilen der Rechte für Finanzbuchhaltung auf Dialogbuchung,Kreditoren-/Debitorenrec... X-Git-Tag: release-3.5.4~2002 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=25d67207329617a104fab716c301895cf0ae116d;p=kivitendo-erp.git Verteilen der Rechte für Finanzbuchhaltung auf Dialogbuchung,Kreditoren-/Debitorenrechnungen(2) Rechte überarbeitet: - Beim Schnellsuchen zur Auswahl alle Rechte erlauben zum Suchen - Der Reiter "Buchungen" kann nur von jemandem geöffnet werden, der Rechnungen editieren darf, deshalb hier von "general_ledger" auf "invoice_edit" umgebaut - Wer Dialogbuchungen machen macht, darf auch das Buchungsjournal ansehen, am die Buchung zu finden. - Bei Kreditorenbuchungen fehlte das neue Recht an einigen Stellen. - Umbenennen des Rechts "Finanzbuchhaltungen" in "Offene Forderungen/Verbindunglichkeiten & Buchungsjournal" --- diff --git a/SL/Controller/AccTrans.pm b/SL/Controller/AccTrans.pm index 6c5806147..37c9d3bfe 100644 --- a/SL/Controller/AccTrans.pm +++ b/SL/Controller/AccTrans.pm @@ -23,7 +23,7 @@ sub action_list_transactions { sub _mini_ledger { my ($self, $transactions) = @_; - $::auth->assert('general_ledger'); + $::auth->assert('invoice_edit'); my $debit_sum = 0; my $credit_sum = 0; @@ -39,7 +39,7 @@ sub _mini_ledger { sub _mini_trial_balance { my ($self, $transactions) = @_; - $::auth->assert('general_ledger'); + $::auth->assert('invoice_edit'); my $rec = {}; foreach my $t ( @{ $transactions } ) { @@ -57,7 +57,7 @@ sub _mini_trial_balance { } sub check_auth { - $::auth->assert('general_ledger'); + $::auth->assert('invoice_edit'); } 1; diff --git a/SL/Controller/TopQuickSearch/GLTransaction.pm b/SL/Controller/TopQuickSearch/GLTransaction.pm index 8eead24de..baa6da0ce 100644 --- a/SL/Controller/TopQuickSearch/GLTransaction.pm +++ b/SL/Controller/TopQuickSearch/GLTransaction.pm @@ -11,7 +11,7 @@ use SL::Locale::String qw(t8); use SL::DBUtils qw(like); use List::Util qw(sum); -sub auth { 'general_ledger' } +sub auth { 'general_ledger|gl_transactions|ap_transactions|ar_transactions' } sub name { 'gl_transaction' } diff --git a/bin/mozilla/ap.pl b/bin/mozilla/ap.pl index 28fa8d2ed..52559ed42 100644 --- a/bin/mozilla/ap.pl +++ b/bin/mozilla/ap.pl @@ -88,7 +88,7 @@ sub add { my $form = $main::form; my %myconfig = %main::myconfig; - $main::auth->assert('general_ledger'); + $main::auth->assert('ap_transactions'); $form->{title} = "Add"; @@ -108,7 +108,7 @@ sub edit { my $form = $main::form; - $main::auth->assert('general_ledger'); + $main::auth->assert('ap_transactions'); $form->{title} = "Edit"; @@ -123,7 +123,7 @@ sub display_form { my $form = $main::form; - $main::auth->assert('general_ledger'); + $main::auth->assert('ap_transactions'); &form_header; &form_footer; @@ -139,7 +139,7 @@ sub create_links { my $form = $main::form; my %myconfig = %main::myconfig; - $main::auth->assert('general_ledger'); + $main::auth->assert('ap_transactions'); $form->create_links("AP", \%myconfig, "vendor"); my %saved; @@ -216,7 +216,7 @@ sub form_header { my $locale = $main::locale; my $cgi = $::request->{cgi}; - $main::auth->assert('general_ledger'); + $main::auth->assert('ap_transactions'); $::form->{invoice_obj} = SL::DB::PurchaseInvoice->new(id => $::form->{id})->load if $::form->{id}; @@ -450,7 +450,7 @@ sub form_header { sub form_footer { $::lxdebug->enter_sub; - $::auth->assert('general_ledger'); + $::auth->assert('ap_transactions'); my $num_due; my $num_follow_ups; @@ -488,7 +488,7 @@ sub mark_as_paid { my $form = $main::form; my %myconfig = %main::myconfig; - $main::auth->assert('general_ledger'); + $main::auth->assert('ap_transactions'); &mark_as_paid_common(\%myconfig,"ap"); @@ -501,7 +501,7 @@ sub update { my $form = $main::form; my %myconfig = %main::myconfig; - $main::auth->assert('general_ledger'); + $main::auth->assert('ap_transactions'); my $display = shift; @@ -589,7 +589,7 @@ sub post_payment { my %myconfig = %main::myconfig; my $locale = $main::locale; - $main::auth->assert('general_ledger'); + $main::auth->assert('ap_transactions'); $form->mtime_ischanged('ap'); $form->{defaultcurrency} = $form->get_default_currency(\%myconfig); @@ -643,7 +643,7 @@ sub post { my %myconfig = %main::myconfig; my $locale = $main::locale; - $main::auth->assert('general_ledger'); + $main::auth->assert('ap_transactions'); $form->mtime_ischanged('ap'); my ($inline) = @_; @@ -745,7 +745,7 @@ sub post_as_new { my $form = $main::form; my %myconfig = %main::myconfig; - $main::auth->assert('general_ledger'); + $main::auth->assert('ap_transactions'); $form->{postasnew} = 1; # saving the history @@ -770,7 +770,7 @@ sub use_as_new { my $form = $main::form; my %myconfig = %main::myconfig; - $main::auth->assert('general_ledger'); + $main::auth->assert('ap_transactions'); map { delete $form->{$_} } qw(printed emailed queued invnumber invdate deliverydate id datepaid_1 gldate_1 acc_trans_id_1 source_1 memo_1 paid_1 exchangerate_1 AP_paid_1 storno); $form->{paidaccounts} = 1; @@ -787,7 +787,7 @@ sub delete { my $form = $main::form; my $locale = $main::locale; - $main::auth->assert('general_ledger'); + $main::auth->assert('ap_transactions'); $form->{title} = $locale->text('Confirm!'); @@ -827,7 +827,7 @@ sub yes { my %myconfig = %main::myconfig; my $locale = $main::locale; - $main::auth->assert('general_ledger'); + $main::auth->assert('ap_transactions'); if (AP->delete_transaction(\%myconfig, \%$form)) { # saving the history @@ -1070,7 +1070,7 @@ sub storno { my %myconfig = %main::myconfig; my $locale = $main::locale; - $main::auth->assert('general_ledger'); + $main::auth->assert('ap_transactions'); if (IS->has_storno(\%myconfig, $form, 'ap')) { $form->{title} = $locale->text("Cancel Accounts Payables Transaction"); diff --git a/bin/mozilla/gl.pl b/bin/mozilla/gl.pl index 42ac4a008..b2c0b9a9c 100644 --- a/bin/mozilla/gl.pl +++ b/bin/mozilla/gl.pl @@ -210,7 +210,7 @@ sub edit { sub search { $::lxdebug->enter_sub; - $::auth->assert('gl_transactions'); + $::auth->assert('general_ledger | gl_transactions'); $::form->all_departments(\%::myconfig); $::form->get_lists( @@ -249,7 +249,7 @@ sub create_subtotal_row { sub generate_report { $main::lxdebug->enter_sub(); - $main::auth->assert('gl_transactions'); + $main::auth->assert('general_ledger | gl_transactions'); my $form = $main::form; my %myconfig = %main::myconfig; diff --git a/bin/mozilla/rp.pl b/bin/mozilla/rp.pl index 0a1a35227..db75257d3 100644 --- a/bin/mozilla/rp.pl +++ b/bin/mozilla/rp.pl @@ -102,8 +102,8 @@ use strict; my $rp_access_map = { 'projects' => 'report', - 'ar_aging' => 'general_ledger | ar_transactions', - 'ap_aging' => 'general_ledger | ap_transactions', + 'ar_aging' => 'general_ledger', + 'ap_aging' => 'general_ledger', 'receipts' => 'cash', 'payments' => 'cash', 'trial_balance' => 'report', diff --git a/locale/de/all b/locale/de/all index cd4fe461f..ec161b194 100755 --- a/locale/de/all +++ b/locale/de/all @@ -72,6 +72,7 @@ $self->{texts} = { 'AP Transactions' => 'Kreditorenbuchungen', 'AP transactions changeable' => 'Änderbarkeit von Kreditorenbuchungen', 'AP transactions with sales taxkeys and/or AR transactions with input taxkeys' => 'Kreditorenbuchungen mit Umsatzsteuer-Steuerschlüsseln und/oder Debitorenbuchungen mit Vorsteuer-Steuerschlüsseln', + 'AP/AR Aging & Journal' => 'Offene Forderungen/Verbindunglichkeiten & Buchungsjournal', 'AR' => 'Verkauf', 'AR Aging' => 'Offene Forderungen', 'AR Transaction' => 'Debitorenbuchung', diff --git a/menus/user/00-erp.yaml b/menus/user/00-erp.yaml index 96250db20..485cd826f 100644 --- a/menus/user/00-erp.yaml +++ b/menus/user/00-erp.yaml @@ -625,7 +625,7 @@ name: Journal icon: journal order: 300 - access: general_ledger + access: general_ledger | gl_transactions module: gl.pl params: action: search diff --git a/sql/Pg-upgrade2-auth/rename_general_ledger_rights.sql b/sql/Pg-upgrade2-auth/rename_general_ledger_rights.sql new file mode 100644 index 000000000..863f5232d --- /dev/null +++ b/sql/Pg-upgrade2-auth/rename_general_ledger_rights.sql @@ -0,0 +1,6 @@ +-- @tag: rename_general_ledger_rights +-- @description: Umbennenung des general ledger Rechts +-- @depends: split_transaction_rights +-- @charset: utf-8 +-- @locales: AP/AR Aging & Journal +UPDATE auth.master_rights SET description='AP/AR Aging & Journal' WHERE name='general_ledger'; diff --git a/templates/webpages/is/form_header.html b/templates/webpages/is/form_header.html index ff9353a42..5e76f88d7 100644 --- a/templates/webpages/is/form_header.html +++ b/templates/webpages/is/form_header.html @@ -38,7 +38,7 @@ [%- IF AUTH.assert('record_links', 1) %]
  • [% 'Linked Records' | $T8 %]
  • [%- END %] - [%- IF AUTH.assert('general_ledger', 1) %] + [%- IF AUTH.assert('invoice_edit', 1) %]
  • [% LxERP.t8('Transactions') %]
  • [%- END %] [%- END %]