[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
Author:   einhverfr
Date:     2014-01-28 05:20:23 +0000 (Tue, 28 Jan 2014)
Log Message:
Tweaking base_user grant.

Modified Paths:

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)");

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.
Ledger-smb-commits mailing list