summaryrefslogtreecommitdiff
path: root/bin/pg-readonly
diff options
context:
space:
mode:
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();
+}