From 81ea97a00b3df5ce3afdbe05119316d39b40d169 Mon Sep 17 00:00:00 2001 From: einhverfr Date: Wed, 12 Sep 2007 06:14:03 +0000 Subject: Goods and Services permissions now added git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1573 4979c152-3d1c-0410-bac9-87ea11338e46 --- sql/modules/Roles.sql | 129 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 128 insertions(+), 1 deletion(-) diff --git a/sql/modules/Roles.sql b/sql/modules/Roles.sql index f61568e8..cfdd62c2 100644 --- a/sql/modules/Roles.sql +++ b/sql/modules/Roles.sql @@ -586,24 +586,149 @@ values (81, 'allow', 'lsmb___create_part'); INSERT INTO menu_acl (node_id, acl_type, role_name) values (82, 'allow', 'lsmb___create_part'); + CREATE ROLE lsmb___edit_part WITH INHERIT NOLOGIN; +GRANT UPDATE ON parts TO lsmb___edit_part; + +INSERT INTO menu_acl (node_id, acl_type, role_name) +values (77, 'allow', 'lsmb___edit_part'); +INSERT INTO menu_acl (node_id, acl_type, role_name) +values (85, 'allow', 'lsmb___edit_part'); +INSERT INTO menu_acl (node_id, acl_type, role_name) +values (86, 'allow', 'lsmb___edit_part'); +INSERT INTO menu_acl (node_id, acl_type, role_name) +values (87, 'allow', 'lsmb___edit_part'); +INSERT INTO menu_acl (node_id, acl_type, role_name) +values (88, 'allow', 'lsmb___edit_part'); +INSERT INTO menu_acl (node_id, acl_type, role_name) +values (89, 'allow', 'lsmb___edit_part'); +INSERT INTO menu_acl (node_id, acl_type, role_name) +values (90, 'allow', 'lsmb___edit_part'); +INSERT INTO menu_acl (node_id, acl_type, role_name) +values (91, 'allow', 'lsmb___edit_part'); +INSERT INTO menu_acl (node_id, acl_type, role_name) +values (93, 'allow', 'lsmb___edit_part'); + + CREATE ROLE lsmb___inventory_reports WITH INHERIT NOLOGIN; +GRANT SELECT ON ar TO lsmb___inventory_reports; +GRANT SELECT ON ap TO lsmb___inventory_reports; +GRANT SELECT ON inventory TO lsmb___inventory_reports; +GRANT SELECT ON invoice TO lsmb___inventory_reports; +GRANT SELECT ON acc_trans TO lsmb___inventory_reports; + +INSERT INTO menu_acl (node_id, acl_type, role_name) +values (77, 'allow', 'lsmb___inventory_reports'); +INSERT INTO menu_acl (node_id, acl_type, role_name) +values (85, 'allow', 'lsmb___inventory_reports'); +INSERT INTO menu_acl (node_id, acl_type, role_name) +values (88, 'allow', 'lsmb___inventory_reports'); +INSERT INTO menu_acl (node_id, acl_type, role_name) +values (94, 'allow', 'lsmb___inventory_reports'); + + +CREATE ROLE lsmb___create_pricegroup +WITH INHERIT NOLOGIN +IN ROLE lsmb___read_contact; + +GRANT INSERT ON pricegroup TO lsmb___create_pricegroup; +GRANT UPDATE ON entity_credit_account TO lsmb___create_pricegroup; + +INSERT INTO menu_acl (node_id, acl_type, role_name) +values (77, 'allow', 'lsmb___create_pricegroup'); +INSERT INTO menu_acl (node_id, acl_type, role_name) +values (83, 'allow', 'lsmb___create_pricegroup'); + + +CREATE ROLE lsmb___edit_pricegroup +WITH INHERIT NOLOGIN +IN ROLE lsmb___read_contact; + +GRANT UPDATE ON pricegroup TO lsmb___edit_pricegroup; +GRANT UPDATE ON entity_credit_account TO lsmb___edit_pricegroup; + +INSERT INTO menu_acl (node_id, acl_type, role_name) +values (77, 'allow', 'lsmb___edit_pricegroup'); +INSERT INTO menu_acl (node_id, acl_type, role_name) +values (85, 'allow', 'lsmb___edit_pricegroup'); +INSERT INTO menu_acl (node_id, acl_type, role_name) +values (92, 'allow', 'lsmb___edit_pricegroup'); + CREATE ROLE lsmb___stock_assembly WITH INHERIT NOLOGIN; +GRANT UPDATE ON parts TO lsmb___stock_assembly; + +INSERT INTO menu_acl (node_id, acl_type, role_name) +values (77, 'allow', 'lsmb___stock_assembly'); +INSERT INTO menu_acl (node_id, acl_type, role_name) +values (84, 'allow', 'lsmb___stock_assembly'); + + CREATE ROLE lsmb___ship_inventory -WITH INHERIT NOLOGIN; +WITH INHERIT NOLOGIN +IN ROLE lsmb___list_sales_orders; + +GRANT INSERT ON inventory TO lsmb___ship_inventory; + +INSERT INTO menu_acl (node_id, acl_type, role_name) +values (63, 'allow', 'lsmb___ship_inventory'); +INSERT INTO menu_acl (node_id, acl_type, role_name) +values (64, 'allow', 'lsmb___ship_inventory'); + CREATE ROLE lsmb___receive_inventory +WITH INHERIT NOLOGIN +IN ROLE lsmb___list_purchase_orders; + +GRANT INSERT ON inventory TO lsmb___receive_inventory; + +INSERT INTO menu_acl (node_id, acl_type, role_name) +values (63, 'allow', 'lsmb___receive_inventory'); +INSERT INTO menu_acl (node_id, acl_type, role_name) +values (65, 'allow', 'lsmb___receive_inventory'); + + +CREATE ROLE lsmb___transfer_inventory WITH INHERIT NOLOGIN; +GRANT INSERT ON inventory TO lsmb___transfer_inventory; + +INSERT INTO menu_acl (node_id, acl_type, role_name) +values (63, 'allow', 'lsmb___transfer_inventory'); +INSERT INTO menu_acl (node_id, acl_type, role_name) +values (66, 'allow', 'lsmb___transfer_inventory'); + CREATE ROLE lsmb___create_warehouse WITH INHERIT NOLOGIN; +GRANT INSERT ON warehouse TO lsmb___create_warehouse; + +INSERT INTO menu_acl (node_id, acl_type, role_name) +values (128, 'allow', 'lsmb___create_warehouse'); +INSERT INTO menu_acl (node_id, acl_type, role_name) +values (141, 'allow', 'lsmb___create_warehouse'); +INSERT INTO menu_acl (node_id, acl_type, role_name) +values (142, 'allow', 'lsmb___create_warehouse'); + + +CREATE ROLE lsmb___edit_warehouse +WITH INHERIT NOLOGIN; + +GRANT UPDATE ON warehouse TO lsmb___edit_warehouse; + +INSERT INTO menu_acl (node_id, acl_type, role_name) +values (128, 'allow', 'lsmb___edit_warehouse'); +INSERT INTO menu_acl (node_id, acl_type, role_name) +values (141, 'allow', 'lsmb___edit_warehouse'); +INSERT INTO menu_acl (node_id, acl_type, role_name) +values (143, 'allow', 'lsmb___edit_warehouse'); + + CREATE ROLE lsmb___all_inventory WITH INHERIT NOLOGIN IN ROLE lsmb___create_part, @@ -611,6 +736,8 @@ lsmb___inventory_reports, lsmb___stock_assembly, lsmb___ship_inventory, lsmb___receive_inventory, +lsmb___transfer_inventory, +lsmb___edit_warehouse, lsmb___create_warehouse; -- GL -- cgit v1.2.3