Re: AW: [Zope-dev] Access problem.

2002-09-26 Thread Ignacio Dosil Lago

On Wednesday 25 September 2002 20:34, you wrote:
  -- I am developing a CMF link product which defines its own traverse
   method:
 
def __bobo_traverse__(self, request, name=None):
  Traverse method hook
 
  if hasattr(self, name):
# return own attributes/subobjects
return getattr(self, name)
  else:
t= self.getTarget()
if hasattr(t, name):
  # return target's attributes/subobjects
  return getattr(t, name)
else:
  return t
 
  -- It works fine under the ZMI but when I try to access an object of this
  product into a CMF portal using the CMF interface, Zope requests me login
  name and password (even if I am admin!!), which it doesn't accept, so the
  only way to continue is to cancel instead of triying to log in.

 I had a similar problem when accessing the request object in
 __bobo_traverse__(self, request, name). Authentication didn´t work
 afterwards.
 I don´t what happens in getTarget() but maybe that´s the problem.
 Arndt

I don't thing the poblem is in getTarget() because when the exception is 
thrown that method is never called. The exception is thrown when 
__bobo_traverse__  returns getattr(linkObject, 'portal_url') and only 
when we are working with links in the CMF interface, not the ZMI.

Any suggestions/questions?
Kind regards.

___
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 )



AW: [Zope-dev] Access problem.

2002-09-25 Thread Arndt Droullier



 -- I am developing a CMF link product which defines its own traverse
  method:

   def __bobo_traverse__(self, request, name=None):
 Traverse method hook

 if hasattr(self, name):
   # return own attributes/subobjects
   return getattr(self, name)
 else:
   t= self.getTarget()
   if hasattr(t, name):
 # return target's attributes/subobjects
 return getattr(t, name)
   else:
 return t

 -- It works fine under the ZMI but when I try to access an object of this
 product into a CMF portal using the CMF interface, Zope requests me login
 name and password (even if I am admin!!), which it doesn't accept, so the
 only way to continue is to cancel instead of triying to log in.

I had a similar problem when accessing the request object in
__bobo_traverse__(self, request, name). Authentication didn´t work
afterwards.
I don´t what happens in getTarget() but maybe that´s the problem.
Arndt


___
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 )