implemented door database check for permission