[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb: [1569] trunk



Revision: 1569
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=1569&view=rev
Author:   einhverfr
Date:     2007-09-11 13:22:52 -0700 (Tue, 11 Sep 2007)

Log Message:
-----------
Cleaning up lsmb-request slightly

Modified Paths:
--------------
    trunk/lsmb-request.pl
    trunk/sql/modules/Roles.sql

Modified: trunk/lsmb-request.pl
===================================================================
--- trunk/lsmb-request.pl	2007-09-11 18:56:22 UTC (rev 1568)
+++ trunk/lsmb-request.pl	2007-09-11 20:22:52 UTC (rev 1569)
@@ -38,7 +38,8 @@
 $request = new LedgerSMB;
 $request->{action} = '__default' if (!$request->{action});
 
-$0 =~ m/([^\/\\]*.pl)\?*.*$/;
+
+$ENV{SCRIPT_NAME} =~ m/([^\/\\]*.pl)\?*.*$/;
 $script = $1;
 $locale = LedgerSMB::Locale->get_handle( ${LedgerSMB::Sysconfig::language} )
   or $request->error( __FILE__ . ':' . __LINE__ . ": Locale not loaded: $!\n" );

Modified: trunk/sql/modules/Roles.sql
===================================================================
--- trunk/sql/modules/Roles.sql	2007-09-11 18:56:22 UTC (rev 1568)
+++ trunk/sql/modules/Roles.sql	2007-09-11 20:22:52 UTC (rev 1569)
@@ -27,6 +27,20 @@
 GRANT SELECT ON person_to_location TO lsmb_<?lsmb dbname ?>__create_contact;
 GRANT SELECT ON vendortax TO lsmb_<?lsmb dbname ?>__create_contact;
 
+INSERT INTO menu_acl (node_id, acl_type, role_name) 
+values (1, 'allow', 'lsmb_<?lsmb dbname ?>__create_contact');
+INSERT INTO menu_acl (node_id, acl_type, role_name) 
+values (11, 'allow', 'lsmb_<?lsmb dbname ?>__create_contact');
+INSERT INTO menu_acl (node_id, acl_type, role_name) 
+values (14, 'allow', 'lsmb_<?lsmb dbname ?>__create_contact');
+INSERT INTO menu_acl (node_id, acl_type, role_name) 
+values (21, 'allow', 'lsmb_<?lsmb dbname ?>__create_contact');
+INSERT INTO menu_acl (node_id, acl_type, role_name) 
+values (30, 'allow', 'lsmb_<?lsmb dbname ?>__create_contact');
+INSERT INTO menu_acl (node_id, acl_type, role_name) 
+values (33, 'allow', 'lsmb_<?lsmb dbname ?>__create_contact');
+
+
 CREATE ROLE lsmb_<?lsmb dbname ?>__create_contact
 WITH INHERIT NOLOGIN
 IN ROLE lsmb_<?lsmb dbname ?>__read_contact;
@@ -53,6 +67,20 @@
 GRANT INSERT ON person_to_location TO lsmb_<?lsmb dbname ?>__create_contact;
 GRANT INSERT ON vendortax TO lsmb_<?lsmb dbname ?>__create_contact;
 
+INSERT INTO menu_acl (node_id, acl_type, role_name) 
+values (1, 'allow', 'lsmb_<?lsmb dbname ?>__create_contact');
+INSERT INTO menu_acl (node_id, acl_type, role_name) 
+values (11, 'allow', 'lsmb_<?lsmb dbname ?>__create_contact');
+INSERT INTO menu_acl (node_id, acl_type, role_name) 
+values (12, 'allow', 'lsmb_<?lsmb dbname ?>__create_contact');
+INSERT INTO menu_acl (node_id, acl_type, role_name) 
+values (21, 'allow', 'lsmb_<?lsmb dbname ?>__create_contact');
+INSERT INTO menu_acl (node_id, acl_type, role_name) 
+values (30, 'allow', 'lsmb_<?lsmb dbname ?>__create_contact');
+INSERT INTO menu_acl (node_id, acl_type, role_name) 
+values (31, 'allow', 'lsmb_<?lsmb dbname ?>__create_contact');
+
+
 CREATE ROLE lsmb_<?lsmb dbname ?>__edit_contact
 WITH INHERIT NOLOGIN
 IN ROLE lsmb_<?lsmb dbname ?>__read_contact;
@@ -93,6 +121,8 @@
 GRANT SELECT ON batch_class TO lsmb_<?lsmb dbname ?>__create_batch;
 GRANT INSERT ON voucher TO lsmb_<?lsmb dbname ?>__create_batch;
 
+-- TODO add Menu ACLs
+
 CREATE ROLE lsmb_<?lsmb dbname ?>__post_batches
 WITH INHERIT NOLOGIN;
 
@@ -102,6 +132,8 @@
 GRANT UPDATE ON batch TO lsmb_<?lsmb dbname ?>__post_batches;
 GRANT UPDATE ON gl TO lsmb_<?lsmb dbname ?>__post_batches;
 
+-- TODO add Menu ACLs
+
 -- AR
 CREATE ROLE lsmb_<?lsmb dbname ?>__create_ar_transaction
 WITH INHERIT NOLOGIN
@@ -110,6 +142,11 @@
 GRANT INSERT ON ar TO lsmb_<?lsmb dbname ?>__create_ar_transaction;
 GRANT INSERT ON acc_trans TO lsmb_<?lsmb dbname ?>__create_ar_transaction;
 
+INSERT INTO menu_acl (node_id, acl_type, role_name)
+values (1, 'allow', 'lsmb_<?lsmb dbname ?>__create_ar_transaction');
+INSERT INTO menu_acl (node_id, acl_type, role_name)
+values (2, 'allow', 'lsmb_<?lsmb dbname ?>__create_ar_transaction');
+
 CREATE ROLE lsmb_<?lsmb dbname ?>__create_ar_transaction_voucher
 WITH INHERIT NOLOGIN
 IN ROLE lsmb_<?lsmb dbname ?>__read_contact,
@@ -118,6 +155,8 @@
 GRANT INSERT ON ar TO lsmb_<?lsmb dbname ?>__create_ar_transaction_voucher;
 GRANT INSERT ON acc_trans TO lsmb_<?lsmb dbname ?>__create_ar_transaction_voucher;
 
+-- TODO add Menu ACLs
+
 CREATE ROLE lsmb_<?lsmb dbname ?>__create_ar_invoice
 WITH INHERIT NOLOGIN
 IN ROLE lsmb_<?lsmb dbname ?>__read_contact,
@@ -126,6 +165,10 @@
 GRANT INSERT ON invoice TO lsmb_<?lsmb dbname ?>__create_ar_invoice;
 GRANT INSERT ON inventory TO lsmb_<?lsmb dbname ?>__create_ar_invoice;
 
+INSERT INTO menu_acl (node_id, acl_type, role_name)
+values (3, 'allow', 'lsmb_<?lsmb dbname ?>__create_ar_invoice');
+
+
 CREATE ROLE lsmb_<?lsmb dbname ?>__create_ar_invoice_voucher
 WITH INHERIT NOLOGIN
 IN ROLE lsmb_<?lsmb dbname ?>__read_contact,
@@ -135,6 +178,8 @@
 GRANT INSERT ON invoice TO lsmb_<?lsmb dbname ?>__create_ar_invoice_voucher;
 GRANT INSERT ON inventory TO lsmb_<?lsmb dbname ?>__create_ar_invoice_voucher;
 
+-- TODO add Menu ACLs
+
 CREATE ROLE lsmb_<?lsmb dbname ?>__list_ar_transactions
 WITH INHERIT NOLOGIN
 IN ROLE lsmb_<?lsmb dbname ?>__read_contact;
@@ -144,6 +189,27 @@
 GRANT SELECT ON invoice TO lsmb_<?lsmb dbname ?>__list_ar_transactions
 GRANT SELECT ON inventory TO lsmb_<?lsmb dbname ?>__list_ar_transactions
 
+INSERT INTO menu_acl (node_id, acl_type, role_name)
+values (1, 'allow', 'lsmb_<?lsmb dbname ?>__list_ar_transactions');
+INSERT INTO menu_acl (node_id, acl_type, role_name)
+values (4, 'allow', 'lsmb_<?lsmb dbname ?>__list_ar_transactions');
+INSERT INTO menu_acl (node_id, acl_type, role_name)
+values (5, 'allow', 'lsmb_<?lsmb dbname ?>__list_ar_transactions');
+INSERT INTO menu_acl (node_id, acl_type, role_name)
+values (6, 'allow', 'lsmb_<?lsmb dbname ?>__list_ar_transactions');
+INSERT INTO menu_acl (node_id, acl_type, role_name)
+values (7, 'allow', 'lsmb_<?lsmb dbname ?>__list_ar_transactions');
+INSERT INTO menu_acl (node_id, acl_type, role_name)
+values (9, 'allow', 'lsmb_<?lsmb dbname ?>__list_ar_transactions');
+INSERT INTO menu_acl (node_id, acl_type, role_name)
+values (10, 'allow', 'lsmb_<?lsmb dbname ?>__list_ar_transactions');
+INSERT INTO menu_acl (node_id, acl_type, role_name)
+values (11, 'allow', 'lsmb_<?lsmb dbname ?>__list_ar_transactions');
+INSERT INTO menu_acl (node_id, acl_type, role_name)
+values (13, 'allow', 'lsmb_<?lsmb dbname ?>__list_ar_transactions');
+INSERT INTO menu_acl (node_id, acl_type, role_name)
+values (15, 'allow', 'lsmb_<?lsmb dbname ?>__list_ar_transactions');
+
 CREATE ROLE lsmb_<?lsmb dbname ?>__ar_all_vouchers
 WITH INHERIT NOLOGIN 
 IN ROLE lsmb_<?lsmb dbname ?>__create_ar_transaction_voucher,
@@ -162,6 +228,12 @@
 GRANT INSERT ON oe TO lsmb_<?lsmb dbname ?>__create_sales_order;
 GRANT INSERT ON orderitems TO lsmb_<?lsmb dbname ?>__create_sales_order;
 
+INSERT INTO menu_acl (node_id, acl_type, role_name)
+values (50, 'allow', 'lsmb_<?lsmb dbname ?>__create_sales_order');
+INSERT INTO menu_acl (node_id, acl_type, role_name)
+values (51, 'allow', 'lsmb_<?lsmb dbname ?>__create_sales_order');
+
+
 CREATE ROLE lsmb_<?lsmb dbname ?>__create_sales_quotation
 WITH INHERIT NOLOGIN
 IN ROLE lsmb_<?lsmb dbname ?>__read_contact;
@@ -169,6 +241,12 @@
 GRANT INSERT ON oe TO lsmb_<?lsmb dbname ?>__create_sales_quotation;
 GRANT INSERT ON orderitems TO lsmb_<?lsmb dbname ?>__create_sales_quotation;
 
+INSERT INTO menu_acl (node_id, acl_type, role_name)
+values (50, 'allow', 'lsmb_<?lsmb dbname ?>__create_sales_quotation');
+INSERT INTO menu_acl (node_id, acl_type, role_name)
+values (51, 'allow', 'lsmb_<?lsmb dbname ?>__create_sales_quotation');
+
+
 CREATE ROLE lsmb_<?lsmb dbname ?>__list_sales_orders
 WITH INHERIT NOLOGIN
 IN ROLE lsmb_<?lsmb dbname ?>__read_contact;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.