[Zope-dev] Unauthorized error with this code

2001-09-17 Thread Servizio tecnico NOMOS



In Python:

def Funzione1():
 class Trecord:
  NOME = 
''
 result = []
 r = Trecord()
 r.NOME = 10 #First 
element
 result.append(r)
 r.NOME = 20 #Second 
element
 result.append(r)
 return result

In Zope I use this function:

!--#with "_(qry=Funzione1())"-- 
!--#in qry-- dtml-var 
NOMEBR 
!--#/in--!--#/with--

Zope don't work and ask me user name and 
password.

If instead write this:


!--#with "_(qry=Funzione1())"-- 
!--#in qry-- testBR 
!--#/in--!--#/with--

This work and diplay correctly: test 
test.

This problem there is only ZOPE 2.4.0, the 
precedent version is run OK.

Can you help ME 
?


Re: [Zope-dev] Unauthorized error with this code

2001-09-17 Thread Steve Alexander

Servizio tecnico NOMOS wrote:


 
 *This work and diplay correctly: test test.*
 
 ** 
 
 *This problem there is only ZOPE 2.4.0, the precedent version is run OK.*
 
 ** 
 
 *Can you help ME ?*


You should read up on the Zope security model. You'll need to make 
security declarations in that class, or define the class attribute

   __allow_access_to_unprotected_subobjects__=1


You can read about the Zope security model in the Zope Developers' Guide:

   http://www.zope.org/Documentation/ZDG


Please do not post HTML mail to this mailing list. Your emails will most 
likely be ignored if you do so.

--
Steve Alexander
Software Engineer
Cat-Box limited


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )