[Rt-commit] r17269 - in rt/3.8/trunk: .

alexmv at bestpractical.com alexmv at bestpractical.com
Tue Dec 16 18:21:22 EST 2008


Author: alexmv
Date: Tue Dec 16 18:21:22 2008
New Revision: 17269

Removed:
   rt/3.8/trunk/etc/acl.Pg-8.2
Modified:
   rt/3.8/trunk/   (props changed)
   rt/3.8/trunk/etc/acl.Pg

Log:
 r40027 at kohr-ah:  chmrr | 2008-12-16 18:21:00 -0500
  * Look at Pg server version to know if the USAGE right exists on sequences


Modified: rt/3.8/trunk/etc/acl.Pg
==============================================================================
--- rt/3.8/trunk/etc/acl.Pg	(original)
+++ rt/3.8/trunk/etc/acl.Pg	Tue Dec 16 18:21:22 2008
@@ -57,10 +57,14 @@
 	 push @acls, "CREATE USER $db_user WITH PASSWORD '$db_pass' NOCREATEDB NOCREATEUSER;";
     }
 
+    my $sequence_right
+        = ( $dbh->{pg_server_version} >= 80200 )
+        ? "USAGE, SELECT, UPDATE"
+        : "SELECT, UPDATE";
     foreach my $table (@tables) {
         if ( $table =~ /^[a-z]/ && $table ne 'sessions' ) {
 # table like objectcustomfields_id_s
-            push @acls, "GRANT SELECT, UPDATE ON $table TO $db_user;"
+            push @acls, "GRANT $sequence_right ON $table TO $db_user;"
         }
         else {
             push @acls, "GRANT SELECT, INSERT, UPDATE, DELETE ON $table TO $db_user;"


More information about the Rt-commit mailing list