Comment 5 for bug 245260

Revision history for this message
Guilherme Salgado (salgado) wrote : Re: [Bug 245260] Re: Too many sql queries issued creating a question from a bug report

My fix changes QuestionTargetMixin.answer_contacts to return decorated
IPerson objects (with their .languages pre-cached). I also did a few
hacks to make them compare equally to their non-decorated counterparts
and to make storm think they're Person objects.

The problem now is that these decorated objects get security-proxied
when .answer_contacts is called from outside of DB code, and there are
no security declarations for the class which decorates IPerson. Is
there a way to copy all the security declarations from a given class to
another one, in python, so that I don't have to duplicate all that zcml
we have to protect Person?