What we have done for our development version is set it up so it can be in one of three modes. Always on (for passageways) so it consistently locks as you walk up and unlocks as you walk away. Always off (always disabled). Or Manual override.
With the Manual override it still unlocks as you approach and locks again as you depart, but it also allows you to lock the door by hand after you come in and will stay locked until you manually unlock it by hand again or send it a direct command from your phone. This way it doesn't unlock randomly while you're walking up to the door to answer it.
It's our first pass at making this particular feature happen.