diff options
author | ivan <ivan> | 2011-03-30 16:57:41 +0000 |
---|---|---|
committer | ivan <ivan> | 2011-03-30 16:57:41 +0000 |
commit | ef9855e3023558132b4669319335782b5dd2ff6d (patch) | |
tree | 5734d432496b6e7cd934ffc2b3639e57e3f31eb7 /bin/pg-readonly | |
parent | f40cdebc5e55cb0a209f7fd3e8c3858402c71f9f (diff) |
add rt tables to pg-readonly, RT#10536
Diffstat (limited to 'bin/pg-readonly')
-rw-r--r-- | bin/pg-readonly | 31 |
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(); +} |