Forum: Ruby on Rails Different application session depending on path

Posted by "Gustavo de Sá Carvalho Honorato" <gustavohonorato (Guest)
on 2013-01-11 11:57
(Received via mailing list)
Hi,

I have a multitenant app and each tenant 'lives' in a subdirectory of my
app. For example:

http://www.myapp.com/tenant1
http://www.myapp.com/tenant2

The problem is that if a tenant1 user logs in he automatically gains 
access
to tenant2 data, because my app is using the same session for all 
tenants
path. One way to solve this issue is creating a new session depending on
the path, but I can't figure out how to do that.

Is there any easy way to do that using Rails?

Thanks in advance,
Gustavo
Posted by tamouse mailing lists (Guest)
on 2013-01-12 14:43
(Received via mailing list)
On Fri, Jan 11, 2013 at 4:56 AM, Gustavo de S Carvalho Honorato
<gustavohonorato@gmail.com> wrote:
> path. One way to solve this issue is creating a new session depending on the
> path, but I can't figure out how to do that.
>
> Is there any easy way to do that using Rails?

Issue a new session after they log in?
http://guides.rubyonrails.org/security.html#sessio...
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.