Forum OpenACS Development: Re: Best practice for marking objects as deleted without removing them from the database

Richard said "The devil would probably be in the way that other applications request the information from the core. The field may need to be carried throught to another table or two in order to avoid joining to acs_objects.

One other issue would be how this would impact the permissions tables. Is there a cheeky way of using the permissions system to tell you that an object is deleted without visiting acs_objects (a magic permission for deleted objects) or do we take all steps to ensure that any change to acs_objects is designed to avoid touching the permissions tables at all?"

There is nothing wrong with joining on the acs_objects table. Most list of objects type pages already join on acs_objects to get creation user, and last_modified at least. So adding an addition "and deleted_p = 't'" or whatever should not be a serious issue.

I also don't think you would need to do anything clever with the permissions system. If you had a certain privilege over and object marked deleted, you should be able to "undelete" it. I can't see having a column as opposed to just deleting the object, if you can't recover it somehow.