default to a session cookie instead of setting an explicit timeout, weird timezone...
[freeside.git] / bin / pg-readonly
old mode 100644 (file)
new mode 100755 (executable)
index ad69fbd..b5cde4d
@@ -22,3 +22,34 @@ foreach my $table ( dbdef->tables ) {
     $dbh->commit();
   }
 }
+
+my @rt_tables = qw(
+Attachments
+Queues
+Links
+Principals
+Groups
+ScripConditions
+Transactions
+Scrips
+ACL
+GroupMembers
+CachedGroupMembers
+Users
+Tickets
+ScripActions
+Templates
+ObjectCustomFieldValues
+CustomFields
+ObjectCustomFields
+CustomFieldValues
+Attributes
+sessions
+);
+
+foreach my $table ( @rt_tables ) {
+  $dbh->do("GRANT SELECT ON $table TO $rouser");
+  $dbh->commit();
+  $dbh->do("GRANT SELECT ON ${table}_id_seq TO $rouser");
+  $dbh->commit();
+}