getting a list of authorized objects
So I have a number of folders (in a CMF site, but that shouldn't matter) with various permissions. If I want certain roles to access the folder, I give it 'View' and 'Access contents information' permissions, and the reverse otherwise. In Zope 2.3.3, I could do a dtml-in on "objectValues(['Folder'])" with skip_unauthorized and it would work passably well. It might not get the sequence variables right, but at least things got shown when they should have been and not otherwise. Now I'm trying it on Zope 2.4, and no such luck. I know that there was some rewriting of the dtml-in rendering between these releases (probably the restricted execution arctitecture), but whatever happened, it doesn't work like it used to. Now I get a KeyError on the first attribute of the first unauthorized thing that comes up in the list. This is a result of trying to do this operation on a "Access contents info" restricted object. It's not skipping unauthorized. So I decided that I'd go and use ZopeFind, but since the folders might have local roles, it doesn't really work easily. I've been trying to figure out how to find out whether an object is allowed in a PythonScript so I can do it myself, but no luck so far. So either: 1) what's wrong with dtml-in in 2.4.0, and how can I fix it? or 2) how do I get this behaviour otherwise? --jcc (blast!)
Are you saying that the key error I get when running in a role differente from manager: <dtml-in PARENTS skip_unauthorized reverse> <dtml-var title_or_id html_quote> </dtml-in> is not my fault and was working prior to Zope 2.4 ? See also my previous message "[Zope] acquisition and permissions (newby)") I am running Zope 2.4 (I never run an earlier version). --peppo -----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of J. Cameron Cooper Sent: venerdi 17 agosto 2001 21.59 To: zope@zope.org Subject: [Zope] getting a list of authorized objects In Zope 2.3.3, I could do a dtml-in on "objectValues(['Folder'])" with skip_unauthorized and it would work passably well. It might not get the sequence variables right, but at least things got shown when they should have been and not otherwise. Now I'm trying it on Zope 2.4, and no such luck. I know that there was some rewriting of the dtml-in rendering between these releases (probably the restricted execution arctitecture), but whatever happened, it doesn't work like it used to. Now I get a KeyError on the first attribute of the first unauthorized thing that comes up in the list. This is a result of trying to do this operation on a "Access contents info" restricted object. It's not skipping unauthorized. So I decided that I'd go and use ZopeFind, but since the folders might have local roles, it doesn't really work easily. I've been trying to figure out how to find out whether an object is allowed in a PythonScript so I can do it myself, but no luck so far. So either: 1) what's wrong with dtml-in in 2.4.0, and how can I fix it? or 2) how do I get this behaviour otherwise? --jcc (blast!) _______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Are you saying that the key error I get when running in a role differente from manager:
<dtml-in PARENTS skip_unauthorized reverse> <dtml-var title_or_id html_quote> </dtml-in>
is not my fault and was working prior to Zope 2.4 ?
Dunno, but I will say that the exact same code (even the exact same Data.fs) was working reasonably before I tried 2.4.0. And since mine is very similar to yours, it seems it might be the same problem. --jcc (blammo!)
OK I soldev it (-; !!! Due to the new authenticated role in Zope 2.4, you need to grant this role the 'view' and 'access content information' permission !!! I have done it sufficiently high in my folder structure and everything works like a charm. This solvs also the problems i reported in my previous post '[Zope] acquisition and permissions (newby)' Enjoy the 2.4, --peppo -----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of J. Cameron Cooper Sent: sabato 18 agosto 2001 0.31 To: zope@zope.org Subject: Re: [Zope] getting a list of authorized objects
Are you saying that the key error I get when running in a role differente from manager:
<dtml-in PARENTS skip_unauthorized reverse> <dtml-var title_or_id html_quote> </dtml-in>
is not my fault and was working prior to Zope 2.4 ?
Dunno, but I will say that the exact same code (even the exact same Data.fs) was working reasonably before I tried 2.4.0. And since mine is very similar to yours, it seems it might be the same problem. --jcc (blammo!) _______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
participants (2)
-
Giuseppe Bonelli -
J. Cameron Cooper