Forum OpenACS Q&A: Subsites & Separate Users
Has anyone implemented such a system?
I've implemented such a system for ACS 3.4 (Oracle). My approach was simply to create a
sites table (with a separate table for mapping hostnames to sites).
I then added the
site_id column to a number of key tables, notable
users. (ACS 3.4 doesn't have an
acs_objects table or a similar mechanism.) Plus a bunch of UI to create and manage the sites, changes to the request processor to set
ad_conn site_id, and the removal or changes of some unique contraints, e.g. on
users.email (this would be
parties.email in OpenACS).
It wasn't the most challenging thing I've accomplished, but it does require some significant changes in the request processor that were sometimes difficult to debug.
All of this was done for an app where we wanted to run a real ASP, i.e. with hundreds of sites.
This should "just work"
An application group should be assigned to each subsite. The application group for the Main Subsite should be registered users.
So to create several subsites you should be able to make them all subsites of Main Subsite. All users will be members of the main subsite. This isn't really a problem, you could set that up as an administrative site. You wouldn't advertise the URL as one for people to visit or register.
I don't see any need to create more layers when the existing tools in OpenACS can support this use.
If a package doesn't honor these settings, it should be fixed. I think it is reasonable for packages to refer to their parent subsite instead of assuming Registered Users and Main Subsite.
Suppose that each subsite is for a separate company and you are acting as an ASP. It's possible that a user would try and register with more than one company so if he/she uses a different password to register with the second company, the system would say "invalid password" or "account already exists".
Of course. My mistake.
Well, OpenACS (ACS 4 really) wasn't designed to do this, now I see why the jumping through hoops is necessary.
I wonder if this is a goal for OpenACS to support. Probably not in the short term, it will require a well thought out design if this type of support can be put into the tookit.
Let the discussion continue! :)