Client (has many domains)
Domain (belongs to client and has many reports)
Report (belongs to domain)
Currently when I select client in the frontend it shows me what domains
belong to that client. I want to set up that when a client logs in it
shows the domains/reports that belong to them.
I think your problem isn’t solely about authentication. IMHO you simply
need
the following steps:
#1: Check if there is a user authenticated => if not display the login
page
or a guest page or whatever #2: Read the session to get the user who is authenticated => don’t know
how
to do this with auth_generator but probably it’s something like
session[:user] #3: use the relation from the read out user with something like:
session[:user].items #4: Display the resulting items
Best Regards
Jan P.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.