From e81f9f44ba8ddcac6d93659ca2aff1b649a1e3a7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Tue, 8 Mar 2022 17:27:53 +0100 Subject: [PATCH] kein DB-Fehler bei fehlender Gruppe Vollzugriff im DB-Upgrade f. Nur-Lese-Rechte Ist beim Test aufgefallen - dort gibt es die Gruppe nicht. --- sql/Pg-upgrade2-auth/rights_view_docs.sql | 26 ++++++++++++++++------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/sql/Pg-upgrade2-auth/rights_view_docs.sql b/sql/Pg-upgrade2-auth/rights_view_docs.sql index 9ddb85ecb..2591ada33 100644 --- a/sql/Pg-upgrade2-auth/rights_view_docs.sql +++ b/sql/Pg-upgrade2-auth/rights_view_docs.sql @@ -59,12 +59,22 @@ INSERT INTO auth.master_rights (position, name, description, category) 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; + 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; + SELECT id, 'sales_quotation_view', true FROM auth.group WHERE name = 'Vollzugriff' UNION + SELECT id, 'sales_order_view', true FROM auth.group WHERE name = 'Vollzugriff' UNION + SELECT id, 'sales_delivery_order_view', true FROM auth.group WHERE name = 'Vollzugriff' UNION + SELECT id, 'sales_invoice_view', true FROM auth.group WHERE name = 'Vollzugriff' UNION + SELECT id, 'request_quotation_view', true FROM auth.group WHERE name = 'Vollzugriff' UNION + SELECT id, 'purchase_order_view', true FROM auth.group WHERE name = 'Vollzugriff' UNION + SELECT id, 'purchase_delivery_order_view', true FROM auth.group WHERE name = 'Vollzugriff' UNION + SELECT id, 'purchase_invoice_view', true FROM auth.group WHERE name = 'Vollzugriff'; -- 2.20.1