Without knowing more context, it might be easier to simply attempt to do something and handle the exception otherwise. For example, if you need to connect but you're not sure if connections are allowed, just attempt to connect in a try block and handle the case it's denied in the except. Or, if you need to know if you need to turn connections back on, just turn it on (even if it's already on).
So I have a co worker that does some database administration stuff and he sometimes forgets to check the box to allow connections. I just want to have a quick little script that checks if he left it unchecked or not.
From what I can tell there must not be a property to describe the state of the check box. That is all I am looking for. I have another route I can go but if there was this option then that would make it easy.