When I looked after a godson once a week from he was four months until he was one, I put a hook high up on my bedroom door, and the loop on the door frame, as I had my sewing machine, and all my dressmaking paraphenalia in that room. The door was sufficiently ajar for the cat to go in there is she so desired.(She didn't as she was the kind of female cat with a Nanny-gene.) But there was no way, the child could open the door and get in there.
I also put a chain and padlock on the outer doors of a porcelain stove that was in use during the winter, so he could not open the doors into the actual fire, and kept the kitchen locked when he and I were in the sitting-room, as I knew full well how fast he could crawl.
It is far pleasanter both for the children, their parents and their grandparents if you have removed dangerous or fragile things to a safe place and locked the cupboard or room, than going around saying no and don't dear, for the duration of their visit.