[CPS-devel] You are not allowed to access 'getContent' in this context

Jean-Marc Orliaguet jmo at ita.chalmers.se
Wed Aug 23 13:17:38 CEST 2006


Jacques Champliaud wrote:
> Hello,
> Sorry to answer you directly, permalink.gmane.org seems to be down for 
> maintenance.
>
> you wrote:
> >you might want to check that the Zcatalog does not contain references 
> to objects that only the administrator can get access to.
> >or re-index the catalog, etc.
>
> My users do have access to those objects ( at least I think they 
> have...) since they can access them directly in the sections where 
> they are published.
> How do I re-index the catalog?
> How do I check that the Zcatalog does not contain references to 
> objects that only the administrator can get access to ?
> Thanks for that incredibly fast answer ;)
> Jacques
>

It's in portal_catalog ("Catalog" tab) and "Advanced" > "Update catalog"

then you can look for the documents

/JM
>
>
> Jean-Marc Orliaguet a écrit :
>> jacques.champliaud at free.fr wrote:
>>> Hello,
>>>
>>> I got a problem with latest_news et latest_document portlets:
>>> It works well for an admin but I get a blinking !!! in state of the 
>>> lasts
>>> 10 docs or news for anyone else.
>>> It seems that this !!! come from
>>>
>>> /CPSProducts/CPSSkins/PortalBoxGroup.py :
>>> ...
>>>   if shield:
>>>         try:
>>>             rendered = portlet.render_cache(**kw)
>>>         except ConflictError: # catch conflict errors
>>>             raise
>>>         except:
>>>             LOG('CPSSkins.PortalBoxGroup:', DEBUG,
>>>             """The portlet with id %s could not be rendered """
>>>             """because it contains errors. To obtain a """
>>>             """detailed error log please deactivate """
>>>             """CPSSkins' built-in crash shield in """
>>>             """portal_themes > Options > Deactivate """
>>>             """the crash shield.""" % portlet.getId())
>>>             rendered = '<blink>!!!PortalBoxGroup!!!</blink>'
>>>   else:
>>>             rendered = portlet.render_cache(**kw)
>>> ...
>>> after crash shield dé-activation any user but admin can't connect 
>>> any more
>>>  and error logs shows :
>>>   File "CPSProducts/CMFCore/FSPythonScript.py", line 164, in _exec
>>>     result = f(*args, **kw)
>>>   File "Script (Python)", line 208, in getContentItems
>>>   File "Script (Python)", line 166, in getBrainInfo
>>> Unauthorized: You are not allowed to access 'getContent' in this 
>>> context
>>>
>>> When those portlets are suppressed in this theme, everything works well
>>> again
>>>
>>> How to fix this problem ?
>>>
>>> Context: debian3.1, zope 2.9.2,python2.4.3, cps3.4.1
>>>
>>> Thanks
>>>
>>>
>>>   
>>
>> the crash shield makes it possible to access the site even if a 
>> portlet raises an exception for some reason (which might be for a 
>> reason not related to the portlet itself since exceptions can 
>> originate from anywhere in the code); which is why the site is 
>> available only when the crash shield is turned on.
>>
>> you turn off the crash shield for debugging purposes to identify the 
>> line that fails
>>
>> now that you've identified the line that causes the problem:
>>
>> line 208, in getContentItems
>> line 166, in getBrainInfo
>>
>> you might want to check that the Zcatalog does not contain references 
>> to objects that only the administrator can get access to.
>>
>> or re-index the catalog, etc.
>>
>> /JM
>>
>>
>>
>>
>> _______________________________________________
>> cps-devel mailing list
>> http://lists.nuxeo.com/mailman/listinfo/cps-devel
>>



More information about the cps-devel mailing list

This list archive provided by Nuxeo, the leaders of open source ECM. Check out the Nuxeo 5 open source, standards-based ECM project.