diff options
author | cvs2git <cvs2git> | 2006-01-05 09:34:30 +0000 |
---|---|---|
committer | cvs2git <cvs2git> | 2006-01-05 09:34:30 +0000 |
commit | 0c525f3ba7b2b6730b8939b950e4d76dd16802a9 (patch) | |
tree | 9d0c5411f52238759ca3484d5ecc036dc6905414 /bin/pg-readonly | |
parent | 8f5c91d6c7a8dc85a8b6768a149b4c7b3e144c38 (diff) |
This commit was manufactured by cvs2svn to create tag 'SQL_LEDGER_2_4_4'.SQL_LEDGER_2_4_4
Diffstat (limited to 'bin/pg-readonly')
-rw-r--r-- | bin/pg-readonly | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/bin/pg-readonly b/bin/pg-readonly deleted file mode 100644 index ad69fbde2..000000000 --- a/bin/pg-readonly +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/perl -# -# hack to update/add read-only permissions for a user on the db -# -# usage: pg-readonly freesideuser readonlyuser - -use strict; -use DBI; -use FS::UID qw(adminsuidsetup); -use FS::Record qw(dbdef); - -my $user = shift or die &usage; -my $rouser = shift or die &usage; - -my $dbh = adminsuidsetup $user; - -foreach my $table ( dbdef->tables ) { - $dbh->do("GRANT SELECT ON $table TO $rouser"); - $dbh->commit(); - if ( my $pkey = dbdef->table($table)->primary_key ) { - $dbh->do("GRANT SELECT ON ${table}_${pkey}_seq TO $rouser"); - $dbh->commit(); - } -} |