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

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



Revision: 4377
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=4377&view=rev
Author:   einhverfr
Date:     2012-03-04 13:36:50 +0000 (Sun, 04 Mar 2012)
Log Message:
-----------
Adding budgetting roles

Modified Paths:
--------------
    trunk/LedgerSMB/Database.pm
    trunk/sql/modules/Roles.sql

Modified: trunk/LedgerSMB/Database.pm
===================================================================
--- trunk/LedgerSMB/Database.pm	2012-03-03 09:36:43 UTC (rev 4376)
+++ trunk/LedgerSMB/Database.pm	2012-03-04 13:36:50 UTC (rev 4377)
@@ -271,7 +271,7 @@
     my $dbh = DBI->connect(
         "dbi:Pg:dbname=$self->{company_name}", 
          "$creds->{login}", "$creds->{password}", 
-         { AutoCommit => 0, PrintError => $logger->is_debug(), }
+         { AutoCommit => 0, PrintError => $logger->is_warn(), }
     );
     if (!$dbh){ # Could not connect, try to validate existance by connecting
                 # to template1 and checking

Modified: trunk/sql/modules/Roles.sql
===================================================================
--- trunk/sql/modules/Roles.sql	2012-03-03 09:36:43 UTC (rev 4376)
+++ trunk/sql/modules/Roles.sql	2012-03-04 13:36:50 UTC (rev 4377)
@@ -1,5 +1,26 @@
 GRANT ALL ON SCHEMA public TO public; -- required for Pg 8.2
 
+CREATE ROLE "lsmb_<?lsmb dbname ?>__budget_enter" WITH INHERIT NOLOGIN;
+CREATE ROLE "lsmb_<?lsmb dbname ?>__budget_view" WITH INHERIT NOLOGIN;
+CREATE ROLE "lsmb_<?lsmb dbname ?>__budget_approve" WITH INHERIT NOLOGIN;
+CREATE ROLE "lsmb_<?lsmb dbname ?>__budget_obsolete" WITH INHERIT NOLOGIN;
+
+GRANT SELECT 
+ON budget_info, budget_line, budget_to_department, budget_to_project
+TO "lsmb_<?lsmb dbname ?>__budget_view";
+
+GRANT INSERT 
+ON budget_info, budget_line, budget_to_department, budget_to_project 
+TO "lsmb_<?lsmb dbname ?>__budget_enter";
+
+GRANT UPDATE (approved_at, approved_by) on budget_info 
+TO "lsmb_<?lsmb dbname ?>__budget_approve";
+
+GRANT UPDATE (obsolete_at, obsolete_by) on budget_info
+TO "lsmb_<?lsmb dbname ?>__budget_obsolete";
+
+GRANT EXECUTE ON FUNCTION budget__reject(in_id int) 
+TO "lsmb_<?lsmb dbname ?>__budget_approve";
 CRATE ROLE "lsmb_<?lsmb dbname ?>__business_units_manage"
 WITH INHERIT NOLOGIN;
 

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