RE: [Zope] Creating PythonMethod from ZClass constructor/method.
> > Using Zope 2.2b3, I am trying to create a PythonMethod from the > constructor of my ZClass and keep getting an authorization > dialog. In my > MyZClass_add method, I have: > > > > > this(), > 'testMethod', > 'Test Method', > 'self', > 'pass' > )"> > > > > Every pemutation I have tried gives the same result: an Unauthorized > exception. Hi Jeff - Thanks for reporting this. It turns out that there was a missing security assertion in the product dispatcher (manage_addProduct) that was causing this. The fix will be in b4. If you want to patch your install in the meantime, edit lib/python/App/FactoryDispatcher.py and change: class ProductDispatcher(Acquisition.Implicit): " " def __getitem__(self, name): ... to: class ProductDispatcher(Acquisition.Implicit): " " # Allow access to factory dispatchers __allow_access_to_unprotected_subobjects__=1 def __getitem__(self, name): ... Brian Lloyd[EMAIL PROTECTED] Software Engineer 540.371.6909 Digital Creations http://www.digicool.com ___ Zope maillist - [EMAIL PROTECTED] 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 )
[Zope] Creating PythonMethod from ZClass constructor/method.
Hello, Using Zope 2.2b3, I am trying to create a PythonMethod from the constructor of my ZClass and keep getting an authorization dialog. In my MyZClass_add method, I have: Every pemutation I have tried gives the same result: an Unauthorized exception. Adding the Python Method by hand works fine, as does adding one using the following URL: http://localhost/sandbox/myInstance/manage_addProduct/ PythonMethod/manage_addPythonMethod?id=foo&title=bar&... If there is one thing I am weak on in Zope, it's permissions. I am assuming there is something wrong with the way mine are set up, but I have no clue what the correct solution is. I haven't had the time to try another Python product, but I am guessing that this problem is not specific to Python Methods; I believe I would run into this same situation trying to add an instance of any python product to my ZClass instance. Anyone have an idea? --Jeff --- Jeff K. Hoffman 704.849.0731 x108 Chief Technology Officer mailto:[EMAIL PROTECTED] Going Virtual, L.L.C. http://www.goingv.com/ ___ Zope maillist - [EMAIL PROTECTED] 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 )