BTW, there are also the "owner actions" which are hobo automatic routing actions for owners of records, described here ...
http://cookbook-1.3.hobocentral.net/manual/controllers#owner_actions However, I found that they didn't work exactly perfect for multi- tenancy because for the index example it changes your route from .. /tasks to /user/:user_id/tasks But it doesn't update any of the hobo rapid/dryml generated magic -- so your tab for "Tasks" disappears. There are some older posts where folks recognized this issue, but I'm not sure if anyone has had time or desire to investigate how to make these owner actions work better. On Oct 20, 11:33 am, Jeremy Savoy <[email protected]> wrote: > I am creating a mulit-tenant application myself using Hobo 1.3 ... > here are a few tips .. > > 1. Set model ownership to each user (do this for each model that will > be owned by each user) by adding this line to each model ... > > belongs_to :owner, :class_name => "User", :creator => true > > 2. Set model permissions appropriately, here is just one example ... > > def create_permitted? > owner_is? acting_user > end > > 3. Define the controller actions to show only the current user's > records, for example if you had a Tasks controller/model ... > > auto_actions :all > > def index > hobo_index current_user.tasks > end > > The Agility tutorial is pretty handy at helping to understand > permissions, but I had to dig around in the group for a bit to find > all of this information and apply it. I still would recommend you take > the time to work through the Agility tutorial if you have not, it > illustrates so many wonderful things about Hobo ... > > http://cookbook-1.3.hobocentral.net/tutorials/agility > > I hope this helps > > On Oct 20, 8:47 am, Michael Q <[email protected]> wrote: > > > > > > > > > Is it possible to add multi-tenancy to a Hobo project? > > Is the Hobo user/rights system based on a particular Rails gem? > > The built-in system does not seem to cater for multi-tenancy and I'm > > guessing that trying to implement it in Hobo would cause more trouble that > > its worth? > > Has anyone tried this? > > > Thanks. > > > M -- You received this message because you are subscribed to the Google Groups "Hobo Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/hobousers?hl=en.
