[dev] Permissions inheritance

Richard Wallace rwallace at thewallacepack.net
Mon Nov 1 12:00:34 PST 2004


Jan Schneider wrote:
> Zitat von Richard Wallace <rwallace at thewallacepack.net>:
> 
>> Chuck Hagenbuch wrote:
>>
>>> Quoting Richard Wallace <rwallace at thewallacepack.net>:
>>>
>>>> Is there anyway to optimize this, maybe by loading all the parent
>>>> permissions in one shot with a single call to the datatree?
>>>
>>>
>>>
>>> You should be able to load everything with a datatree::get() call 
>>> starting at
>>> the root ('-1').
>>>
>>
>> I had thought about that, but that would load all permissions for
>> everything, wouldn't it?  I guess I was hoping more for something to do
>> the reverse, that is, starting with a node load its attributes and it's
>> parents, rather than starting with a node and loading all the children.
> 
> 
> Something like DataTree::getParents()?

No, I'm using DataTree::getParentList() right now to get a list of 
parents and then do the permissions check.  The problem with that is 
that there is a separate query to the database for each parent in the 
list which could become a performance problem.  What I want is something 
to extract all the information needed in one shot.  I'll have to look at 
the DataTree more carefully to determine if this is possible (I can't 
imagine it wouldn't be, I'd just have to copy the DataTree::getParents() 
method and expand it to get information other than just the names and 
ids of the parents, right?).

Rich


More information about the dev mailing list