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