Locking and unlocking documents

I have a custom locking mechanism. Do you propose anything else instead?