mumuki-laboratory icon indicating copy to clipboard operation
mumuki-laboratory copied to clipboard

Be able to define non-tenantized routes

Open luchotc opened this issue 4 years ago • 1 comments

It would be nice to be able to have routes like /faqs or /terms, which would redirect the user based on its student_granted_organizations. A criteria should be established to obtain the "best" organization for the user to be redirected to, and only in a tie situation, prompt a pop-up for the user to choose it.

We could use a logic similar to the one behind smart redirections (take into account that that feature is designed based on a clear origin organization). Something like

user.rb

def single_immersive_organization
  student_granted_organizations.flat_map { |it| immersive_organizations_for(it) }.uniq.single 
end

We could make this method part of main_organization logic as well

luchotc avatar Feb 03 '21 17:02 luchotc

Related to #1564

luchotc avatar Feb 03 '21 17:02 luchotc