I have written a module that puts a "generate pdf" link on a node when it is viewed. What I now want to do is lock the original node after the pdf is generated.
I know I could just add a "locked" field to the content type I want to lock, and then programatically set that etc. But I'd prefer it to work with any content type.
How can I programatically disable the editing of a node? I'd prefer to install as few additional modules as possible.