Remove delete permission on a versioned SDE featureclass

811
2
09-27-2012 12:27 PM
ClarrieHall
New Contributor
I want to prevent data editors from deleting features from an individual versioned featureclass in SDE 10.x
I still want them to be able to insert new records and modify existing records.
Using my limited ability to read help systems, I have found that the insert, update and delete permissions seem to be tied together for versioned featureclasses.

Is there a work around for this?
0 Kudos
2 Replies
VinceAngelo
Esri Esteemed Contributor
With versioning, a delete, isn't a delete, it's an insert to the D table. And an update
isn't an update, it's an insert to the A table *and* an insert to the D table. So you
can't even block inserts on the D table without preventing versioned editing from
functioning.

You can certainly detect DELETEs (Ds without corresponding As, though the API handles
that for you), and then act on that knowledge, but you can't prevent it from happening.

- V
0 Kudos
ClarrieHall
New Contributor
Thanks Vince, that makes sense.
Do you happen to know about the timing of add and delete inserts?
I know that I could use database triggers to do the detection of a delete but would I need to know the order of operations to be sure that a corresponding add was not going to happen?

I am assuming that it would be a very bad plan to delete records from the deletes table using SQL.
This would leave two options at the time of delete:
1) use SQL to add a corresponding record to the adds table (This may also be a very bad plan)
2) run an arcpy operation to re-add the deleted record.
Either way I could set an expiry date which is what I want to happen in preference to the delete.
A third option might be to try and to this not at delete time but prior to allowing a post operation.

I would prefer to be able to provide feedback to the user to make it clear that the record should be expired not deleted.
Any thoughts?

Clarrie
0 Kudos