Forum: Ruby on Rails Different application session depending on path

0b71eeee5def8b2b0a5ab8ea308af570?d=identicon&s=25 "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
Aa082c8b00a50928e5860dcd70bf2368?d=identicon&s=25 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

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.