Re: Managing access to references?
dieter <[email protected]> Tue, 16 Jun 2015 07:51:47 +0200
| Newsgroups | gmane.comp.web.zope.plone.user |
|---|---|
| Message-ID | <[email protected]> |
Christoph Pingel <[email protected]> writes: > Hello, > > I have a site running Plone 4.16 with a custom contenttype. I need certain functionality to be available for anonymous users, which I can steer with adapted workflows. > However, I ran into a problem with references. > > Traceback (innermost last): > ... > Module Products.PloneHotfix20130618.catalog, line 56, in getObject > Module OFS.Traversable, line 316, in restrictedTraverse > Module OFS.Traversable, line 251, in unrestrictedTraverse > __traceback_info__: ([], '933200cf2aca426ca4098213a4eb85c7') > Unauthorized: You are not allowed to access '933200cf2aca426ca4098213a4eb85c7' in this context > ... > I appreciate any hints to a solution. I would approach this problem via debugging, e.g. by means of "Products.PDBDebugMode". First, I would find out which type of object this is, by which "object permission" is is protected and what to do to get this permission granted to "Anonymous". The object permission of an object "obj" is "obj.__roles__". However, due to access magic, "obj.__roles__" is usually immediately resolved to the roles the permission is granted to. The get the permission itself, some access path must be used which avoids the access magic - often "obj.__class__.__roles__". The result is an object defined on "C" level. Use "dir" on it to find out about its attributes. Some of those attributes give the permission name. ------------------------------------------------------------------------------