add grant_options

This commit is contained in:
Lars Kanis 2011-05-20 15:51:50 +02:00
parent 0bb2754bca
commit fccc2df8db

View File

@ -222,8 +222,9 @@ class Application
end end
def grant_membership(role_name, add_members) def grant_membership(role_name, add_members)
pg_conf = @config[:pg_groups]
add_members_escaped = add_members.map{|m| "\"#{m}\"" }.join(",") add_members_escaped = add_members.map{|m| "\"#{m}\"" }.join(",")
pg_exec "GRANT \"#{role_name}\" TO #{add_members_escaped}" pg_exec "GRANT \"#{role_name}\" TO #{add_members_escaped} #{pg_conf[:grant_options]}"
end end
def revoke_membership(role_name, rm_members) def revoke_membership(role_name, rm_members)