[Rt-commit] r18796 - in rtfm/trunk: .
falcone at bestpractical.com
falcone at bestpractical.com
Fri Mar 13 17:40:08 EDT 2009
Author: falcone
Date: Fri Mar 13 17:40:08 2009
New Revision: 18796
Modified:
rtfm/trunk/ (props changed)
rtfm/trunk/etc/acl.Pg
Log:
r45652 at ketch: falcone | 2009-03-13 17:37:42 -0400
RT-Ticket: 13268
RT-Action: Correspond
RT-Status: Resolved
ported rt's version checking scheme over to rtfm
Modified: rtfm/trunk/etc/acl.Pg
==============================================================================
--- rtfm/trunk/etc/acl.Pg (original)
+++ rtfm/trunk/etc/acl.Pg Fri Mar 13 17:40:08 2009
@@ -16,11 +16,16 @@
);
+ my $sequence_right
+ = ( $dbh->{pg_server_version} >= 80200 )
+ ? "USAGE, SELECT, UPDATE"
+ : "SELECT, UPDATE";
foreach my $table (@tables) {
- push @acls,
- "GRANT SELECT, INSERT, UPDATE, DELETE ON $table to "
- . $RT::DatabaseUser . ";";
-
+ if ( $table =~ /id_seq$/ ) {
+ push @acls, "GRANT $sequence_right ON $table TO $RT::DatabaseUser;";
+ } else {
+ push @acls, "GRANT SELECT, INSERT, UPDATE, DELETE ON $table to $RT::DatabaseUser;";
+ }
}
return (@acls);
}
More information about the Rt-commit
mailing list