Thanks to Cat and Emile. Your editing efforts are very helpful. I think
the current version is near completion. Late for work, gotta run.

Ron Parker
Mi-Recordz
www.mi-recordz.com
[EMAIL PROTECTED]
Introduction to SiteGroup (SiteGard) Virtual Database Environments

A SiteGroup creates a multiple virtual database environment within Midgard's single 
Mysql database. All content in the database is tagged as belonging to a specific 
SiteGroup. Consequently, when a user logs into a Host that is part of a specific 
SiteGroup, they are only able to read and write data that belongs to that SiteGroup. 
Additionally, it facilitates sharing Host content for multiple SiteGroups, and it 
reduces the number of persistent database connections.

Suppose there are 10 distinct user-level Hosts in an installation. Two of these, 
vmuc.com and vmucentertainment.com, are owned by Henry, but he has no connection with 
the other eight. He must have administrative privileges for his two Hosts, while being 
denied access to the other Hosts.

Configuration Of A SiteGroup-aware Midgard

To build a SiteGroup-aware Midgard installation, you must reconfigure and recompile 
all the Midgard packages. This also applies when moving from a SiteGroup aware 
installation to a non-SiteGroup installation. To include SiteGroups, you must specifiy 
"--with-sitegroups" during the configuration of libmidgard. The configure programs for 
mod_midgard and midgard-php will probe libmidgard to see if SiteGroups are enabled and 
respond accordingly.

Configuring libmidgard with SiteGroups adds columns and one table to the Midgard 
database. Existing records have their SiteGroup field set to "0", so everything that 
exists when you apply the patch is owned by SiteGroup zero (SG0). Users who require 
full access to the Midgard database must have their "member" and "person" records 
specified within SG0 and be made a member of the ficticious group with ID 0. We'll 
call these users "root".

Although SiteGroups is designed to be as transparent as possible, you must
manually install SiteGroups by issuing the mysql command:

INSERT INTO sitegroup (name) VALUES ('sitegroupname');[1]

When moving data from one SiteGroup to another, we reccommend rebuilding each group 
from scratch. Create the SiteGroup as shown above, and log into that SiteGroup as 
admin@newsitegroupname. Then build:
*a Host record "www.vmuc.com"
*a User group "owners"
*one user "henry"

This enables Henry's write permissions for vmuc.com.

Using SiteGroups

When logging into the Midgard administration site, the user is prompted to specifiy a 
username@sitegroup. Either a SiteGroup name or 0 must be specified. (Normal users, 
including SiteGroup administrators use the "username@sitegroup" format. When logging 
in as root, you use the format "username#sitegroup." The "#" says you want to be 
root). 

If you're root, you have the option of logging into any SiteGroup. Root users must 
login with either "username#" which logs them into the shared SiteGroup 0 and grants 
write permissions across all SiteGroups, or "username#sitegroup" which grants write 
permissions for the specific SiteGroup.

Only root users, members of SG0, can remain in SG0 while logged in. Any valid user can 
log into the Administration site; however, they are restricted to reading documents 
which are owned by the SiteGroup they signed in under, and can only commit edits to 
the files they own.

When Henry specifies [EMAIL PROTECTED], mysql queries the Host SiteGroup field to 
determine which records he will see in the administration interface.

The building of Host records is limited to root users. When building a new Host, the 
first step is to create its SiteGroup, unless one exists. Then you must log in as 
"admin@newsitegroupname." By logging into the Host's SiteGroup you'll insure that 
everything you build will default to being owned by that SiteGroup.

Another SiteGroup feature is the Administration group -- these groups can be thought 
of as an umbrella under which many Hosts are managed.  In our example, the Hosts 
vmuc.com and vmucentertainment.com are both under the care of the vmuc.com SiteGroup. 
Consequently, when Henry logs in as [EMAIL PROTECTED] he's able to read and edit the 
records for both of these sites. 

Members of administration groups have unrestricted create and modify access to all 
resources within their SiteGroup. Root users are automatically admininstration users 
for every SiteGroup. The Admingroup for a Sitegroup is specfied in the admingroup 
table. Both the group and the person records must be in the SiteGroup that they're 
adminstrators for.

[1]David Guerizec is currently writing an admin-site interface for SiteGroups. It 
should be available for the Midgard 1.4beta release.
--
This is The Midgard Project's mailing list. For more information,
please visit the project's web site at http://www.midgard-project.org

To unsubscribe the list, send an empty email message to address
[EMAIL PROTECTED]

Reply via email to