X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Fetc%2Facl.Pg;h=dd1b334147d1e1a4f2a4e6dc518bbf21a74f51ec;hb=HEAD;hp=9da28dba72ee39849387a7a156cbcf274e550e47;hpb=f3c4966ed1f6ec3db7accd6dcdd3a5a3821d72a7;p=freeside.git diff --git a/rt/etc/acl.Pg b/rt/etc/acl.Pg index 9da28dba7..dd1b33414 100755 --- a/rt/etc/acl.Pg +++ b/rt/etc/acl.Pg @@ -23,6 +23,8 @@ sub acl { Transactions scrips_id_seq Scrips + objectscrips_id_seq + ObjectScrips acl_id_seq ACL groupmembers_id_seq @@ -64,17 +66,14 @@ sub acl { # if there's already an rt_user, use it. my @row = $dbh->selectrow_array( "SELECT usename FROM pg_user WHERE usename = '$db_user'" ); unless ( $row[0] ) { - push @acls, "CREATE USER \"$db_user\" WITH PASSWORD '$db_pass' NOCREATEDB NOCREATEUSER;"; + push @acls, "CREATE USER \"$db_user\" WITH PASSWORD '$db_pass' NOCREATEDB NOSUPERUSER;"; } - my $sequence_right - = ( $dbh->{pg_server_version} >= 80200 ) - ? "USAGE, SELECT, UPDATE" - : "SELECT, UPDATE"; foreach my $table (@tables) { if ( $table =~ /^[a-z]/ && $table ne 'sessions' ) { -# table like objectcustomfields_id_s - push @acls, "GRANT $sequence_right ON $table TO \"$db_user\";" + # Sequences; not all end with _seq because + # objectcustomfieldvalues_id_s is too long + push @acls, "GRANT USAGE, SELECT, UPDATE ON $table TO \"$db_user\";" } else { push @acls, "GRANT SELECT, INSERT, UPDATE, DELETE ON $table TO \"$db_user\";"