Re: do we need plone.app.customerize? was: [Plone-Users] Insufficient privileges on folder_contents

Nathan Van Gheem <[email protected]>
Newsgroups gmane.comp.web.zope.plone.devel
Message-ID <CAL8hw9FbGM53=gVwE+jHzfbYAuMhq=CHXZqi20=_pT6AUQes2w@mail.gmail.com>
On Tue, Dec 10, 2013 at 12:11 PM, David Glick (Plone) <david.glick-z4DKO/[email protected]
> wrote:

> On 12/9/13, 9:34 PM, Nathan Van Gheem wrote:
>
>> Playing with the idea of TTW jbot: https://github.com/collective/
>> collective.jbot
>>
>> This approach isn't "safe." It actually creates temp files for each
>> template customization so templates aren't run in restricted python.
>>
>> I think this could hit most people's use-cases though.
>>
>> Thoughts?
>>
>>
> Well, not running restricted Python means it only hits the use cases for
> standalone sites, or shared installations where a Manager in one site is
> allowed access to other sites.
>
> Looks like a good replacement for portal_view_customizations for
> overriding templates in a standalone site, though.
>
yes, right now that's how it works. I think we could change it to
eventually work with multiple sites. It'd just need to set the patched
template location every time so it can work with multiple sites haven't
different patches.


> Code review: You should probably create one temp directory for the process
> and hold a reference to it in a global, rather than creating one for each
> file. Also, if I'm not mistaken it looks like this takes precedence over
> the template manager from z3c.jbot, and thus would prevent z3c.jbot from
> working?
>
I haven't made sure but jbot goes through all the registered
TemplateManager adapters and checks to see if it has a customization.
However, the order these managers are called could be a problem.

It likely needs some more thought and jbot might need some patches to make
it work correctly with typical package overrides but it was just a quick
try...


> David
>



-- 
Nathan Van Gheem
Solutions Architect
Wildcard Corp

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk

_______________________________________________
Plone-developers mailing list
Plone-developers-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/plone-developers
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.