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

SF.net SVN: ledger-smb:[4220] branches/1.3/sql/modules/Roles.sql



Revision: 4220
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=4220&view=rev
Author:   ehuelsmann
Date:     2011-12-15 19:35:03 +0000 (Thu, 15 Dec 2011)
Log Message:
-----------
Convert 'IN ROLE' to 'GRANT role TO role' because the latter works on upgrades.

Modified Paths:
--------------
    branches/1.3/sql/modules/Roles.sql

Modified: branches/1.3/sql/modules/Roles.sql
===================================================================
--- branches/1.3/sql/modules/Roles.sql	2011-12-15 17:32:06 UTC (rev 4219)
+++ branches/1.3/sql/modules/Roles.sql	2011-12-15 19:35:03 UTC (rev 4220)
@@ -216,9 +216,12 @@
 -- AR
 CREATE ROLE "lsmb_<?lsmb dbname ?>__ar_transaction_create"
 WITH INHERIT NOLOGIN
-IN ROLE "lsmb_<?lsmb dbname ?>__contact_read",
-"lsmb_<?lsmb dbname ?>__exchangerate_edit";
+IN ROLE "lsmb_<?lsmb dbname ?>__contact_read";
 
+-- Role created later; using the GRANT construct, we support upgrades
+GRANT "lsmb_<?lsmb dbname ?>__exchangerate_edit"
+   TO "lsmb_<?lsmb dbname ?>__ar_transaction_create";
+
 GRANT INSERT ON ar, invoice_note 
 TO "lsmb_<?lsmb dbname ?>__ar_transaction_create";
 
@@ -328,9 +331,13 @@
 
 CREATE ROLE "lsmb_<?lsmb dbname ?>__sales_order_create"
 WITH INHERIT NOLOGIN
-IN ROLE "lsmb_<?lsmb dbname ?>__contact_read",
-"lsmb_<?lsmb dbname ?>__exchangerate_edit";
+IN ROLE "lsmb_<?lsmb dbname ?>__contact_read";
 
+-- Role created later; using the GRANT construct, we support upgrades
+GRANT "lsmb_<?lsmb dbname ?>__exchangerate_edit"
+   TO "lsmb_<?lsmb dbname ?>__sales_order_create";
+
+
 GRANT INSERT, UPDATE ON oe TO "lsmb_<?lsmb dbname ?>__sales_order_create";
 GRANT ALL ON oe_id_seq TO "lsmb_<?lsmb dbname ?>__sales_order_create";
 GRANT INSERT, UPDATE ON orderitems TO "lsmb_<?lsmb dbname ?>__sales_order_create";
@@ -348,9 +355,12 @@
 
 CREATE ROLE "lsmb_<?lsmb dbname ?>__sales_quotation_create"
 WITH INHERIT NOLOGIN
-IN ROLE "lsmb_<?lsmb dbname ?>__contact_read",
-"lsmb_<?lsmb dbname ?>__exchangerate_edit";
+IN ROLE "lsmb_<?lsmb dbname ?>__contact_read";
 
+-- Role created later; using the GRANT construct, we support upgrades
+GRANT "lsmb_<?lsmb dbname ?>__exchangerate_edit"
+   TO "lsmb_<?lsmb dbname ?>__sales_quotation_create";
+
 GRANT INSERT, UPDATE ON oe TO "lsmb_<?lsmb dbname ?>__sales_quotation_create";
 GRANT ALL ON oe_id_seq TO "lsmb_<?lsmb dbname ?>__sales_quotation_create";
 GRANT INSERT, UPDATE ON orderitems TO "lsmb_<?lsmb dbname ?>__sales_quotation_create";
@@ -408,9 +418,13 @@
 -- AP
 CREATE ROLE "lsmb_<?lsmb dbname ?>__ap_transaction_create"
 WITH INHERIT NOLOGIN
-IN ROLE "lsmb_<?lsmb dbname ?>__contact_read",
-"lsmb_<?lsmb dbname ?>__exchangerate_edit";
+IN ROLE "lsmb_<?lsmb dbname ?>__contact_read";
 
+-- Role created later; using the GRANT construct, we support upgrades
+GRANT "lsmb_<?lsmb dbname ?>__exchangerate_edit"
+   TO "lsmb_<?lsmb dbname ?>__ap_transaction_create";
+
+
 GRANT SELECT, INSERT ON ap, invoice_note 
 TO "lsmb_<?lsmb dbname ?>__ap_transaction_create";
 GRANT ALL ON id TO "lsmb_<?lsmb dbname ?>__ap_transaction_create";
@@ -516,9 +530,12 @@
 
 CREATE ROLE "lsmb_<?lsmb dbname ?>__purchase_order_create"
 WITH INHERIT NOLOGIN
-IN ROLE "lsmb_<?lsmb dbname ?>__contact_read",
-"lsmb_<?lsmb dbname ?>__exchangerate_edit";
+IN ROLE "lsmb_<?lsmb dbname ?>__contact_read";
 
+-- Role created later; using the GRANT construct, we support upgrades
+GRANT "lsmb_<?lsmb dbname ?>__exchangerate_edit"
+   TO "lsmb_<?lsmb dbname ?>__purchase_order_create";
+
 GRANT INSERT, UPDATE ON oe TO "lsmb_<?lsmb dbname ?>__purchase_order_create";
 GRANT INSERT, UPDATE ON orderitems TO "lsmb_<?lsmb dbname ?>__purchase_order_create";
 GRANT ALL ON oe_id_seq TO "lsmb_<?lsmb dbname ?>__purchase_order_create";
@@ -537,9 +554,12 @@
 
 CREATE ROLE "lsmb_<?lsmb dbname ?>__rfq_create"
 WITH INHERIT NOLOGIN
-IN ROLE "lsmb_<?lsmb dbname ?>__contact_read",
-"lsmb_<?lsmb dbname ?>__exchangerate_edit";
+IN ROLE "lsmb_<?lsmb dbname ?>__contact_read";
 
+-- Role created later; using the GRANT construct, we support upgrades
+GRANT "lsmb_<?lsmb dbname ?>__exchangerate_edit"
+   TO "lsmb_<?lsmb dbname ?>__rfq_create";
+
 GRANT INSERT, UPDATE ON oe TO "lsmb_<?lsmb dbname ?>__rfq_create";
 GRANT INSERT, UPDATE ON orderitems TO "lsmb_<?lsmb dbname ?>__rfq_create";
 GRANT ALL ON oe_id_seq TO "lsmb_<?lsmb dbname ?>__rfq_create";

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