Annet, is this a publicly available website/service? If so, it would be great to list it on www.web2py.com/poweredby (which at the moment is generating errors for some reason). Anthony
On Saturday, April 30, 2011 3:10:44 AM UTC-4, annet wrote: > I have been working on something similar for some time now, and so far > I haven't encountered any problems. I have a single web2py app and a > single PostgreSQL database. In db.py I defined a 'company' table and > added a company_id field to all the other tables (writable and > readable set to False). (Because I ran into trouble extending > functionality, I have planned to alter the data model in a next > iteration. Define a 'party' table and change all the company_id > references to party_id and add a 'organisation' table and 'people' > table.) > > In the web2py app I have, amongst others, a user cms and an admin cms > controller. The user cms completely depends on the company_id field I > added to the auth_user table. I my case I have five groups: root, > plan1, plan2, plan3 and plan4, where the plans are packages of > functions. I coded a custom registration function, in which I link > users to groups in the auth_membership table. The admin cms can be > accessed by users with root membership. They retrieve the company of > which they want to administer the data and the company_id is set in > session.company_id. > > I hope this gives you an idea of one possible solution. > > > Kind regards, > > Annet. > >