Alternately, you can give the door the name 'locked' so it's always locked (thanks to Muzzle for that one ).
Naming the door 'locked' (target name) won't actually make it locked. To make a locked door, without the ability to ever open it, use these properties:
(func_door_rotating)
name: dummydoor
speed: 0
delay before close: 0
Locked sound: Latch Locked
Distance (deg) 0
With these properties added to the door, the door never will open, and when you touch it, you will hear the locked sound.
Use a multisource and fill it's name in in the master property of the door. Now set up an env_global and set the global state of that multisource off whenever you trigger the env_global. Trigger the env_global by the switch and you can lock the door.
Basically, the state of the doors master (the multisource here) controls whether it can open or not. The same can be applied to buttons and a lot of other entities.
Sigh. And again: you don't need an env_global to achieve that effect! All you need is:
The locked door
A lock
One multisource
Required properties to fill in:
The locked door:
master: lock_ms
The lock:
target on break: lock_ms
The multisource:
name: lock_ms
What will hapen:
When you destroy the door lock with your crowbar or any other weapon, it'll target the multisource, and the multisource will target the door making it unlocked.
I haven't tested this yet, but i used this method before, and i believe this is the way to do it.