unrestrictedGetObject()

Argh! Sometimes I am truly amazed by how much I can complicate things.

For the past year or so, every time I had to access an object with brain.getObject() that I otherwise did not have permission to, I went to great lengths hacking Zope’s SecurityManager to let me do it.

Today, I was introducted to unrestrictedGetObject(). I have kind of expected that it should exist, but I’ve always looked in the wrong place. It’s dead-easy to use:

brain._unrestrictedGetObject()

Hopefully this spares someone some frustration.