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

ruz at bestpractical.com ruz at bestpractical.com
Tue Dec 2 20:20:34 EST 2008


Author: ruz
Date: Tue Dec  2 20:20:34 2008
New Revision: 17072

Added:
   rt/3.8/trunk/etc/acl.Pg-8.2
      - copied, changed from r13308, /rt/3.8/trunk/etc/acl.Pg
Modified:
   rt/3.8/trunk/Makefile.in
   rt/3.8/trunk/etc/acl.Pg
   rt/3.8/trunk/lib/RT/Handle.pm

Log:
* add acl.Pg-8.2 and support for versioned acl.* files
* Pg has support for USAGE privilege on sequences only starting
  from Pg 8.2.0

Modified: rt/3.8/trunk/Makefile.in
==============================================================================
--- rt/3.8/trunk/Makefile.in	(original)
+++ rt/3.8/trunk/Makefile.in	Tue Dec  2 20:20:34 2008
@@ -172,6 +172,7 @@
 
 ETC_FILES		=	acl.Informix \
 			acl.Pg \
+			acl.Pg-8.2 \
 			acl.Oracle \
 			acl.mysql \
 			acl.Sybase \

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  2 20:20:34 2008
@@ -60,7 +60,7 @@
     foreach my $table (@tables) {
         if ( $table =~ /^[a-z]/ && $table ne 'sessions' ) {
 # table like objectcustomfields_id_s
-            push @acls, "GRANT USAGE, SELECT, UPDATE ON $table TO $db_user;"
+            push @acls, "GRANT SELECT, UPDATE ON $table TO $db_user;"
         }
         else {
             push @acls, "GRANT SELECT, INSERT, UPDATE, DELETE ON $table TO $db_user;"

Copied: rt/3.8/trunk/etc/acl.Pg-8.2 (from r13308, /rt/3.8/trunk/etc/acl.Pg)
==============================================================================
--- /rt/3.8/trunk/etc/acl.Pg	(original)
+++ rt/3.8/trunk/etc/acl.Pg-8.2	Tue Dec  2 20:20:34 2008
@@ -60,7 +60,7 @@
     foreach my $table (@tables) {
         if ( $table =~ /^[a-z]/ && $table ne 'sessions' ) {
 # table like objectcustomfields_id_s
-            push @acls, "GRANT USAGE, SELECT, UPDATE ON $table TO $db_user;"
+            push @acls, "GRANT USAGE, SELECT, UPDATE ON SEQUENCE $table TO $db_user;"
         }
         else {
             push @acls, "GRANT SELECT, INSERT, UPDATE, DELETE ON $table TO $db_user;"

Modified: rt/3.8/trunk/lib/RT/Handle.pm
==============================================================================
--- rt/3.8/trunk/lib/RT/Handle.pm	(original)
+++ rt/3.8/trunk/lib/RT/Handle.pm	Tue Dec  2 20:20:34 2008
@@ -411,8 +411,10 @@
     my $path;
     if ( -d $base_path ) {
         $path = File::Spec->catfile( $base_path, "acl.$db_type");
+        $path = $self->GetVersionFile($dbh, $path);
+
         $path = File::Spec->catfile( $base_path, "acl")
-            unless -e $path;
+            unless $path && -e $path;
         return (0, "Couldn't find ACLs for $db_type")
             unless -e $path;
     } else {


More information about the Rt-commit mailing list