summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2011-03-30 16:57:42 +0000
committerivan <ivan>2011-03-30 16:57:42 +0000
commit177b7404b8ade75769709de59a79879bef449bf5 (patch)
treee8b894ab6a3c8bb47842ea661dcb11635a961557
parent6f2740eb64792d8273963b5252f582e270661057 (diff)
add rt tables to pg-readonly, RT#10536
-rw-r--r--bin/pg-readonly31
1 files changed, 31 insertions, 0 deletions
diff --git a/bin/pg-readonly b/bin/pg-readonly
index ad69fbde2..091174cff 100644
--- a/bin/pg-readonly
+++ b/bin/pg-readonly
@@ -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 $rt_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();
+}