Hello all, I'm tring to execute this script: lista = [] folder = container.indice2() #indice2 is a ZCatalog for file in folder: if not file.hasProperty('codice'): lista.append(file.id) attributes=getattr(folder, file) attributes.manage_addProperty('codice', 'inserted yet', 'string') return lista I borrowed the idea from the /Examples/GuestBook/addEntry script Zope prompts me for a user name and passwd, I type my usual account data (I'm the only user and I think I have full privileges) and BAM! Zope Error Zope has encountered an error while publishing this resource. Error Type: Unauthorized Error Value: You are not allowed to access in this context Troubleshooting Suggestions * The URL may be incorrect. * The parameters passed to this resource may be incorrect. * A resource that this resource relies on may be encountering an error. For more detailed information about the error, please refer to the HTML source for this page. If the error persists please contact the site maintainer. Thank you for your patience. I tried to give the script all the proxy roles I could I opened Control Panel/acl_users and gave manage property permission to managers and owners (I'm a manager user): NOTHING! Please: what's going on? Thanks anybody who will help me Bye Catonano
Hi, Shane Hathaway's VerboseSecurity product is helpful in making this sort of thing much less mysterious: http://hathaway.freezope.org/Software/VerboseSecurity HTH, - C On Sun, 2001-12-23 at 18:46, Catonano wrote:
Hello all,
I'm tring to execute this script:
lista = [] folder = container.indice2() #indice2 is a ZCatalog for file in folder: if not file.hasProperty('codice'): lista.append(file.id) attributes=getattr(folder, file) attributes.manage_addProperty('codice', 'inserted yet', 'string') return lista
I borrowed the idea from the /Examples/GuestBook/addEntry script
Zope prompts me for a user name and passwd, I type my usual account data (I'm the only user and I think I have full privileges) and BAM!
Zope Error
Zope has encountered an error while publishing this resource.
Error Type: Unauthorized Error Value: You are not allowed to access in this context
Troubleshooting Suggestions
* The URL may be incorrect. * The parameters passed to this resource may be incorrect. * A resource that this resource relies on may be encountering an error.
For more detailed information about the error, please refer to the HTML source for this page.
If the error persists please contact the site maintainer. Thank you for your patience.
I tried to give the script all the proxy roles I could I opened Control Panel/acl_users and gave manage property permission to managers and owners (I'm a manager user): NOTHING!
Please: what's going on?
Thanks anybody who will help me Bye Catonano
_______________________________________________ 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 )
Chris, On 22 Dec 2002 18:51:54 -0500, Chris McDonough wrote:
Hi,
Shane Hathaway's VerboseSecurity product is helpful in making this sort of thing much less mysterious:
Downloaded and frantically found the products folder, I get this message from the terminal, when launching zope: 2002-12-21T00:50:42 INFO(0) VerboseSecurity Unable to patch PermissionRole. Put ZOPE_SECURITY_POLICY=PYTHON in the environment to enable display of permission names in Unauthorized exceptions. Since I'm a lazy old style Mac user I can't deal with unix enviroinment variables. Well this is not the right place for this but since we're at it, would you suggest me a way to put this setting on? Thanks so much (what's the smiley for the gratitude?) Catonano
You can start Zope like so: ./start ZOPE_SECURITY_POLICY=PYTHON .. to get the desired effect... If you can't get it going that way, the canonical way to set environment varibles in a UNIX environment under the Bourne shell and likenesses: export ZOPE_SECURITY_POLICY=PYTHON then... ./start HTH, - C On Fri, 2002-12-20 at 19:55, Catonano wrote:
Chris,
On 22 Dec 2002 18:51:54 -0500, Chris McDonough wrote:
Hi,
Shane Hathaway's VerboseSecurity product is helpful in making this sort of thing much less mysterious:
Downloaded and frantically found the products folder, I get this message from the terminal, when launching zope:
2002-12-21T00:50:42 INFO(0) VerboseSecurity Unable to patch PermissionRole. Put ZOPE_SECURITY_POLICY=PYTHON in the environment to enable display of permission names in Unauthorized exceptions.
Since I'm a lazy old style Mac user I can't deal with unix enviroinment variables.
Well this is not the right place for this but since we're at it, would you suggest me a way to put this setting on?
Thanks so much (what's the smiley for the gratitude?) Catonano
_______________________________________________ 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 )
Chris, On 22 Dec 2002 21:41:57 -0500, Chris McDonough wrote:
You can start Zope like so:
./start ZOPE_SECURITY_POLICY=PYTHON
.. to get the desired effect...
thanks. ;) I tried and I'm not getting error messages related to permissions anymore. It seems that the c module I replaced with your instructions were more restrictive. I'd love to understand a little more about this stuff. Thanks Bye Catonano
The two modules should be completely equivalent. If they are not (if it continues to fail without ZOPE_SECURITY_POLICY=PYTHON), it's unfortunately a bug. If you can isolate the issue, it might be worth entering a Collector issue with its details at http://collector.zope.org/Zope. Thanks! - C On Sat, 2002-12-21 at 16:28, Catonano wrote:
Chris,
On 22 Dec 2002 21:41:57 -0500, Chris McDonough wrote:
You can start Zope like so:
./start ZOPE_SECURITY_POLICY=PYTHON
.. to get the desired effect...
thanks. ;)
I tried and I'm not getting error messages related to permissions anymore.
It seems that the c module I replaced with your instructions were more restrictive. I'd love to understand a little more about this stuff.
Thanks Bye Catonano
_______________________________________________ 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 )
On 23 Dec 2002 17:01:21 -0500, Chris McDonough wrote:
The two modules should be completely equivalent. If they are not (if it continues to fail without ZOPE_SECURITY_POLICY=PYTHON), it's unfortunately a bug. If you can isolate the issue, it might be worth entering a Collector issue with its details at http://collector.zope.org/Zope.
Thanks!
Chris, you're welcome. I tried to execute that script without that setting and it worked. So, we can exclude the bug and the evidence is that it was that I was scripting something wrong. Now I corrected the scrip and obviously I can't recuperate the error condition :-( Well, as I said, I'd LOVE to understand some more about this stuff. Thanks anyhow. Bye Catonano
Catonano wrote at 2001-12-24 00:46 +0100:
I'm tring to execute this script:
lista = [] folder = container.indice2() #indice2 is a ZCatalog for file in folder: if not file.hasProperty('codice'): A catalog does not return the actual objects, but so called brains. You use "getObject" to get the object from the brain.
Dieter
participants (3)
-
Catonano -
Chris McDonough -
Dieter Maurer