X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=bin%2Fpg-readonly;h=b5cde4d6ecf66f1fafbad82450845bbe13b48e09;hp=ad69fbde295a2bca9ab2c5b0a49c3776ac2080ff;hb=HEAD;hpb=673b9a458d9138523026963df6fa3b4683e09bae diff --git a/bin/pg-readonly b/bin/pg-readonly old mode 100644 new mode 100755 index ad69fbde2..b5cde4d6e --- 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(); +}