[ZPT] Security with PageTemplateFile

Brent M Hendricks brent@valinor.waldenweb.com
Tue, 4 Dec 2001 17:03:21 -0600


On Tue, Dec 04, 2001 at 04:34:43PM -0500, Evan Simpson wrote:
> Brent M Hendricks wrote:
> 
> >Then in the management page template I have a line like:
> >
> ><span tal:replace="here/conf/DEFAULT_HOST_NAME">MyHost</span>
> >
> >Unfortunately this give me the error
> >
> >Error Type: Undefined
> >Error Value: You are not allowed to access DEFAULT_HOST_NAME in this
> >context not found in 'here/conf/DEFAULT_HOST_NAME', at line 5, column 9
> 
> Since mm_cfg is a module, you could do:
> 
> from AccessControl import ModuleSecurityInfo
> ModuleSecurityInfo('Mailman').declarePublic('mm_cfg')
> ModuleSecurityInfo('Mailman.mm_cfg').setDefaultAccess("allow")

Hmm.  This didn't work.  Could there be something else I'm missing?

--Brent

-------------------------------------------------------------------------

"The programmer, like the poet, works only slightly removed from pure
 thought-stuff.  He builds his castles in the air, from air, creating
 by exertion of the imagination.  Few media of creation are so
 flexible, so easy to polish and rework, so readily capable of
 realizing grand conceptual structures."
                        -- Frederick Brooks, Jr., The Mythical Man Month