cancel
Showing results for 
Search instead for 
Did you mean: 

[URGENT] preventing node delete with policy

tonc
Champ on-the-rise
Champ on-the-rise
Hi all,

I have a policy that automatically adds/removes associations depending on the content.
I would like to be able to block a delete of a node if it is the targetnode of such an association.
What is the best way to do this? Just throw an exception in the beforeDeleteNode() (when using BeforeDeleteNodePolicy) or use some kind of lock/permission together with the association?
Help would be greatly appreciated!

Greetz,
Toon
1 REPLY 1

zaizi
Champ in-the-making
Champ in-the-making
Do the check in beforeDeleteNode() and throw an exception.