From 64e2e5110c566354322764918e05c4fbfeb778df Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Wed, 2 Mar 2022 14:48:29 +0100 Subject: [PATCH] Rechte (nur) zum Lesen von Belegen --- locale/de/all | 8 +++ locale/en/all | 8 +++ sql/Pg-upgrade2-auth/rights_view_docs.sql | 70 +++++++++++++++++++++++ 3 files changed, 86 insertions(+) create mode 100644 sql/Pg-upgrade2-auth/rights_view_docs.sql diff --git a/locale/de/all b/locale/de/all index bed6237e2..0c734bb53 100755 --- a/locale/de/all +++ b/locale/de/all @@ -4214,9 +4214,17 @@ $self->{texts} = { 'Version actions' => 'Aktionen für Versionen', 'Version number' => 'Versionsnummer', 'Versions' => 'Versionen', + 'View RFQs' => 'Lieferantenanfragen ansehen', 'View SEPA export' => 'SEPA-Export-Details ansehen', 'View background job execution result' => 'Verlauf der Hintergrund-Job-Ausführungen anzeigen', + 'View purchase delivery orders' => 'Einkaufslieferscheine ansehen', + 'View purchase invoices' => 'Einkaufsrechungen ansehen', + 'View purchase orders' => 'Lieferantenaufträge ansehen', 'View record links from Sales Order' => 'Verknüpfte Belege immer vom Verkaufsauftrag ansehen', + 'View sales delivery orders' => 'Verkaufslieferscheine ansehen', + 'View sales invoices and credit notes' => 'Rechnungen und Gutschriften ansehen', + 'View sales orders' => 'Auftragsbestätigungen ansehen', + 'View sales quotations' => 'Angebote ansehen', 'View sent email' => 'Verschickte E-Mail anzeigen', 'View warehouse content' => 'Lagerbestand ansehen', 'View/edit all employees purchase documents' => 'Bearbeiten/ansehen der Einkaufsdokumente aller Mitarbeiter', diff --git a/locale/en/all b/locale/en/all index 049720000..2699e2e67 100644 --- a/locale/en/all +++ b/locale/en/all @@ -4213,9 +4213,17 @@ $self->{texts} = { 'Version actions' => '', 'Version number' => '', 'Versions' => '', + 'View RFQs' => '', 'View SEPA export' => '', 'View background job execution result' => '', + 'View purchase delivery orders' => '', + 'View purchase invoices' => '', + 'View purchase orders' => '', 'View record links from Sales Order' => '', + 'View sales delivery orders' => '', + 'View sales invoices and credit notes' => '', + 'View sales orders' => '', + 'View sales quotations' => '', 'View sent email' => '', 'View warehouse content' => '', 'View/edit all employees purchase documents' => '', diff --git a/sql/Pg-upgrade2-auth/rights_view_docs.sql b/sql/Pg-upgrade2-auth/rights_view_docs.sql new file mode 100644 index 000000000..9ddb85ecb --- /dev/null +++ b/sql/Pg-upgrade2-auth/rights_view_docs.sql @@ -0,0 +1,70 @@ +-- @tag: rights_view_docs +-- @description: Rechte zum Lesen von Belegen +-- @depends: release_3_6_0 +-- @locales: View sales quotations +-- @locales: View sales orders +-- @locales: View sales delivery orders +-- @locales: View sales invoices and credit notes +-- @locales: View RFQs +-- @locales: View purchase orders +-- @locales: View purchase delivery orders +-- @locales: View purchase invoices + +INSERT INTO auth.master_rights (position, name, description, category) + VALUES ((SELECT position + 10 FROM auth.master_rights WHERE name = 'sales_quotation_edit'), + 'sales_quotation_view', + 'View sales quotations', + FALSE); + +INSERT INTO auth.master_rights (position, name, description, category) + VALUES ((SELECT position + 10 FROM auth.master_rights WHERE name = 'sales_order_edit'), + 'sales_order_view', + 'View sales orders', + FALSE); + +INSERT INTO auth.master_rights (position, name, description, category) + VALUES ((SELECT position + 10 FROM auth.master_rights WHERE name = 'sales_delivery_order_edit'), + 'sales_delivery_order_view', + 'View sales delivery orders', + FALSE); + +INSERT INTO auth.master_rights (position, name, description, category) + VALUES ((SELECT position + 10 FROM auth.master_rights WHERE name = 'invoice_edit'), + 'sales_invoice_view', + 'View sales invoices and credit notes', + FALSE); + +INSERT INTO auth.master_rights (position, name, description, category) + VALUES ((SELECT position + 10 FROM auth.master_rights WHERE name = 'request_quotation_edit'), + 'request_quotation_view', + 'View RFQs', + FALSE); + +INSERT INTO auth.master_rights (position, name, description, category) + VALUES ((SELECT position + 10 FROM auth.master_rights WHERE name = 'purchase_order_edit'), + 'purchase_order_view', + 'View purchase orders', + FALSE); + +INSERT INTO auth.master_rights (position, name, description, category) + VALUES ((SELECT position + 10 FROM auth.master_rights WHERE name = 'purchase_delivery_order_edit'), + 'purchase_delivery_order_view', + 'View purchase delivery orders', + FALSE); + +INSERT INTO auth.master_rights (position, name, description, category) + VALUES ((SELECT position + 10 FROM auth.master_rights WHERE name = 'vendor_invoice_edit'), + 'purchase_invoice_view', + 'View purchase invoices', + FALSE); + + +INSERT INTO auth.group_rights (group_id, "right", granted) + SELECT (SELECT id FROM auth.group WHERE name = 'Vollzugriff'), 'sales_quotation_view', true UNION + SELECT (SELECT id FROM auth.group WHERE name = 'Vollzugriff'), 'sales_order_view', true UNION + SELECT (SELECT id FROM auth.group WHERE name = 'Vollzugriff'), 'sales_delivery_order_view', true UNION + SELECT (SELECT id FROM auth.group WHERE name = 'Vollzugriff'), 'sales_invoice_view', true UNION + SELECT (SELECT id FROM auth.group WHERE name = 'Vollzugriff'), 'request_quotation_view', true UNION + SELECT (SELECT id FROM auth.group WHERE name = 'Vollzugriff'), 'purchase_order_view', true UNION + SELECT (SELECT id FROM auth.group WHERE name = 'Vollzugriff'), 'purchase_delivery_order_view', true UNION + SELECT (SELECT id FROM auth.group WHERE name = 'Vollzugriff'), 'purchase_invoice_view', true; -- 2.20.1