X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=bin%2Fpg-readonly;h=b5cde4d6ecf66f1fafbad82450845bbe13b48e09;hp=ad69fbde295a2bca9ab2c5b0a49c3776ac2080ff;hb=a36e0f8a0f69349dafaa16d1d2d57dfb6e5dbc85;hpb=0fb307c305e4bc2c9c27dc25a3308beae3a4d33c 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(); +}