Forum OpenACS Q&A: Response to Categories in OpenACS 4

Collapse
Posted by Don Baccus on
Yes, context_id is used for permissions inheritance, thus must be settable to NULL.  In fact acs_object.new defaults it to NULL.  This is key to the permissions model.  The distinction's blurred because there are packages that use context_id as a surrogate for "my parent" rather than "the object I inherit permissions from (if any)".  Such code is wrong and should get cleaned up someday.

The "proper" way to do that in the original ACS 4 design is to have a parent column in your derived type and use that to relate objects together.

Whether or not a general mechanism should be provided is worth thinking about, but adding to the existing breakage of the usage of context_id isn't the right way to go about it.