[Zope] SOS - outer product, or external method needed with classes ! Please help me !

Alexis Roda alexis.roda at urv.es
Mon Sep 20 10:25:29 EDT 2004


kepes.krisztian wrote:
> Hi !
> 
> I start the full development of my idea, a special form tool.
> It is uses classes, not python dicts, so I cannot write the code in 
> python scripts.
> 
> In native python everything is working good. The FormClasses.Grid is 
> generate a grid with datas well.
> 
> So I try to do it in Zope.
> 
> First I trying with a Product creation.
> The product is nothing to do else, only create an interface with two 
> method, and these methods are creating special objects - grid, and 
> fielddefs.
> 
> The tester program is that (py script):
> 
> fds=context.uft.createformclass('fields')
> # 1
> fd=fds.Add()
> fd.Name='ID'
> fd.Type='int'
> # 2
> 
> When I put a "return 1" to #1, it is showed.
> But when I move that to #2, the zope is say "Unauthorized !", and it is 
> show an pwd dialog.
> 
> I don't understand, why do it, and why do it in FieldDefs.Add() ?
> 
> Ok, I think that I avoid product usage, I use external method.
> I put everything to uftext.py, and I create an external method object.
> 
> fds=context.extcreateformclass('fields')
> # 1
> fd=fds.Add()
> fd.Name='ID'
> fd.Type='int'
> # 2
> 
> But the result is same.
> The fielddefs.Add is moving into unauth-ed area...
> 
> Why ?

probably you should start reading the zope developers guide:

http://zope.org/Documentation/Books/ZDG/current/

specially chapter 7, Security:

http://zope.org/Documentation/Books/ZDG/current/Security.stx

Somewhere under zope.org there is a product called VerboseSecurity, this 
product shows more verbose information about unauthorized exceptions, 
very helpful to track down the source of your problem.



HTH
-- 
                                    ////
                                   (@ @)
----------------------------oOO----(_)----OOo--------------------------
<>               Ojo por ojo y el mundo acabara ciego
/\ Alexis Roda - Universitat Rovira i Virgili - Reus, Tarragona (Spain)
-----------------------------------------------------------------------



More information about the Zope mailing list