Rails & Postgres sandbox

11 views
Skip to first unread message

Ralph Shnelvar

unread,
Apr 14, 2018, 3:29:03 PM4/14/18
to Ruby on Rails: Talk
Ruby,

I have a collection of Postgres tables I want my users to be able to access (share)but not modify on my Rails website .  I want each of them to be able to extract data from the tables using whatever SQL they wish and for each user not to be able to interact with other users' extracted data.

I have Devise working to give access to each separate user but now I need/want suggestions as to how to link a Devise authorized user with a correspondingly named Postgres user.

Suggestions would be appreciated.

Ralph Shnelvar

koulikoff

unread,
Apr 14, 2018, 3:57:29 PM4/14/18
to Ruby on Rails: Talk

Hassan Schroeder

unread,
Apr 14, 2018, 10:16:04 PM4/14/18
to rubyonrails-talk
On Sat, Apr 14, 2018 at 12:28 PM, Ralph Shnelvar <ral...@dos32.com> wrote:

> I have a collection of Postgres tables I want my users to be able to access
> (share)but not modify on my Rails website . I want each of them to be able
> to extract data from the tables using whatever SQL they wish and for each
> user not to be able to interact with other users' extracted data.

I think the above requirement is somewhat orthogonal to the one
below, but...

> I have Devise working to give access to each separate user but now I
> need/want suggestions as to how to link a Devise authorized user with a
> correspondingly named Postgres user.

ActiveRecord::ConnectionHandling.establish_connection

--
Hassan Schroeder ------------------------ hassan.s...@gmail.com
twitter: @hassan
Consulting Availability : Silicon Valley or remote

Ralph Shnelvar

unread,
Apr 14, 2018, 10:39:22 PM4/14/18
to Hassan Schroeder, rubyonra...@googlegroups.com
Hassan,

Why is it orthogonal?

And, yes, I understand what orthogonal means in this context.

And thank you for pointing out ActiveRecord::ConnectionHandling.establish_connection.

Ralph

Saturday, April 14, 2018, 8:15:13 PM, you wrote:


HS> On Sat, Apr 14, 2018 at 12:28 PM, Ralph Shnelvar <


>> I have a collection of Postgres tables I want my users to be able to access
>> (share)but not modify on my Rails website .  I want each of them to be able
>> to extract data from the tables using whatever SQL they wish and for each
>> user not to be able to interact with other users' extracted data.

HS> I think the above requirement is somewhat orthogonal to the one
HS> below, but...


>> I have Devise working to give access to each separate user but now I
>> need/want suggestions as to how to link a Devise authorized user with a
>> correspondingly named Postgres user.

HS>   ActiveRecord::ConnectionHandling.establish_connection

HS> --
HS> Hassan Schroeder ------------------------
hassan.s...@gmail.com
HS> twitter: @hassan
HS> Consulting Availability : Silicon Valley or remote




Ralph
Reply all
Reply to author
Forward
0 new messages