From: Bernd Bleßmann Date: Fri, 11 Oct 2019 12:18:31 +0000 (+0200) Subject: Recht zum Bearbeiten von Preisen in Belgen nach Ver- und Einkauf trennen X-Git-Tag: release-3.5.6.1~452 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=b2a768881dcfbacaa665d2ddc3297074621bdc75;p=kivitendo-erp.git Recht zum Bearbeiten von Preisen in Belgen nach Ver- und Einkauf trennen Das Recht "edit_prices" galt bisher sowohl für Verkauf als auch für Einkauf. Nun wird das getrennt in "sales_esit_prices" und "purchase_edit_prices". --- diff --git a/sql/Pg-upgrade2-auth/rights_sales_purchase_edit_prices.sql b/sql/Pg-upgrade2-auth/rights_sales_purchase_edit_prices.sql new file mode 100644 index 000000000..aa529f847 --- /dev/null +++ b/sql/Pg-upgrade2-auth/rights_sales_purchase_edit_prices.sql @@ -0,0 +1,17 @@ +-- @tag: rights_sales_purchase_edit_prices +-- @description: Recht zum Bearbeiten von Preisen nach Ver- und Einkauf trennen +-- @depends: release_3_5_4 right_purchase_all_edit + +INSERT INTO auth.master_rights (position, name, description, category) + VALUES ((SELECT position + 10 FROM auth.master_rights WHERE name = 'purchase_all_edit'), + 'purchase_edit_prices', + 'Edit prices and discount (if not used, textfield is ONLY set readonly)', + FALSE); + +-- same rights as edit_prices because sales and purchase were not distingushed before +INSERT INTO auth.group_rights (group_id, "right", granted) + SELECT group_id, 'purchase_edit_prices', granted FROM auth.group_rights WHERE "right" = 'edit_prices'; + +-- rename "edit_prices" to "sales_edit_prices" +UPDATE auth.master_rights SET name = 'sales_edit_prices' WHERE name = 'edit_prices'; +UPDATE auth.group_rights SET "right" = 'sales_edit_prices' WHERE "right" = 'edit_prices';