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

Posted by Stephen . on
Some packages use context_id to denote 'my parent' AS WELL AS 'the object I inherit permission from', not INSTEAD of.  If your object always inherits permissions from it's logical parent then you can use context_id and there is no adverse interaction with the permission system.

I think this all got started because there was talk of a need for a general way to model containership, i.e. 'which is this objects parent', and an idea was to overload the context_id, as typically the logical parent is the object permissions should be inherited from.  If the core ACS assumed a logical heirarchy through context_id it would be impossible to create models with different security contexts and parents, hence the "don't overload context_id" argument, maybe...

I like Neophytos' not null improvement to the context_id column. A null context_id signifies 'default' only (whether permissions should be inherited is controlled by security_inherit_p), so he is inserting the default security context explicitly.  Does this even have implications for Oracle and it's inability to index null values..?