Forum: Ruby on Rails Different application session depending on path

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
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...
This topic is locked and can not be replied to.