Soft Deletion of Items

Topics: General Topic
Dec 2, 2011 at 8:49 AM

Hi Andrea,

I have used NetSqlAzMan for implementing Authorization in our project and it works great !

There is a provision to the admin users to create/delete roles. I am currently using ObjItem.Delete() to delete the item/role.

Though this works fine, it deletes the role and all its mappings permanently from the system. There is no way to revert this back and the admin has to create the entire mappings and the role once again if needed.

I would like to know if there a way to soft-delete the items/roles instead of permanent deletion. The other option I have is to add an extra column in Items table with a boolean flag to mark the items for deletion. But this would tamper with the default structure of tables/api's exposed by NetSqlAzMan and i would prefer not to do this.

Please suggest a way out.

Thanks !


Dec 2, 2011 at 9:36 PM

Instead of deleting Authorizations you could just set the permission from “Allow” to “Neutral” and set also the field “Valid to” to the current DateTime.

In this way the authorization is not more valid but if you need to restore it …you can just change it back.

Of course this method does not work for Items but only for authorizations.



Andrea Ferendeles
NetSqlAzMan Project Coordinator
E-mail Web