X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=bin%2Fpg-readonly;h=b5cde4d6ecf66f1fafbad82450845bbe13b48e09;hp=ad69fbde295a2bca9ab2c5b0a49c3776ac2080ff;hb=1aecd5bf33146bf3f374341a3814960ae1d419e8;hpb=c648976f0b7975f2328ebd7ba8c711fad0ca4195 diff --git a/bin/pg-readonly b/bin/pg-readonly index ad69fbde2..b5cde4d6e 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 $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(); +}