Forum OpenACS Q&A: Re: Unable to delete package instance of 'Download'

Collapse
Posted by Vinod Kurup on
Most acs_objects in a package should be children of the package_id, right? Would it make sense to go through all children of the package_id, figure out what acs_object_type it is and then call the del function for that acs_object_type? We'd need a generic package_delete_object similar to our package_instantiate_object. I think using this for all packages would fix most of the 'delete-package' problems but I'm not sure if it would be too far-reaching by deleting data that belonged to other packages.
Collapse
Posted by Tilmann Singer on
With children - do you mean by way of context_id? This field is according to the kernel docs explicitely _only_ for security purposes (and should have been called security_context_id propably). So I wouldn't deduce any further child/parent relationships from it, at least that's what I remember from earlier discussions on this topic.
Collapse
Posted by Vinod Kurup on
Yeah, I did mean children via context_id. Oh well, I guess packages will have to write their own delete-objects callbacks. I was looking for an easy way out.
Collapse
Posted by Tom Jackson on

When you delete an object, you need to update all objects which use the object_id as their context_id, probably setting it to (What is the default now? -4?). This was discussed a while back, has acs_object.delete been changed to do this yet? Of course you also have rel_segments and permissions to delete as well.

Collapse
Posted by Richard Hamilton on
I see the question is harder to answer than it was to ask!

Is the issue with deleting unwanted user records similar and if a solution is worked through to one problem will it be applicable to both issues?

Regards
Richard