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

SF.net SVN: ledger-smb:[6677] trunk/LedgerSMB/Scripts/setup.pm



Revision: 6677
          http://sourceforge.net/p/ledger-smb/code/6677
Author:   einhverfr
Date:     2014-01-28 05:20:23 +0000 (Tue, 28 Jan 2014)
Log Message:
-----------
Tweaking base_user grant.

Modified Paths:
--------------
    trunk/LedgerSMB/Scripts/setup.pm

Modified: trunk/LedgerSMB/Scripts/setup.pm
===================================================================
--- trunk/LedgerSMB/Scripts/setup.pm	2014-01-28 04:38:11 UTC (rev 6676)
+++ trunk/LedgerSMB/Scripts/setup.pm	2014-01-28 05:20:23 UTC (rev 6677)
@@ -940,8 +940,12 @@
 	if ! $success;
 
     $dbh->do("delete from defaults where setting_key like 'migration_%'");
+
+    # If users are added to the user table, and appropriat roles created, this
+    # then grants the base_user permission to them.  Note it only affects users
+    # found also in pg_roles, so as to avoid errors.  --CT
     $dbh->do("SELECT admin__add_user_to_role(username, lsmb__role('base_user'))
-                from users");
+                from users WHERE username IN (select rolname from pg_roles)");
 
     $dbh->commit;
     $dbh->begin_work;

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


------------------------------------------------------------------------------
WatchGuard Dimension instantly turns raw network data into actionable 
security intelligence. It gives you real-time visual feedback on key
security issues and trends.  Skip the complicated setup - simply import
a virtual appliance and go from zero to informed in seconds.
http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk
_______________________________________________
Ledger-smb-commits mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-commits