summaryrefslogtreecommitdiff
path: root/bin/pg-readonly
diff options
context:
space:
mode:
authorivan <ivan>2011-03-30 16:57:41 +0000
committerivan <ivan>2011-03-30 16:57:41 +0000
commitef9855e3023558132b4669319335782b5dd2ff6d (patch)
tree5734d432496b6e7cd934ffc2b3639e57e3f31eb7 /bin/pg-readonly
parentf40cdebc5e55cb0a209f7fd3e8c3858402c71f9f (diff)
add rt tables to pg-readonly, RT#10536
Diffstat (limited to 'bin/pg-readonly')
-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();
+}