[Zope] Mailhost expects different security settings in different folders

Andreas Tille tillea at rki.de
Tue Jan 27 06:38:54 EST 2004


Hello,

I observed a strange effect when using a script which sends some notification
mail.  Here is the striped down version of the script:


  try:
     mailhost=getattr(context, context.superValues('Mail Host')[0].id)
  except:
     raise AttributeError, "Can not find a Mail Host object."

  mailhost.send("Subject: Simple Mail\n\nMessage", "tillea at localhost", "tillea at rki.de")


If I use the "Test" button of this script it just sends a mail to me.
This works fine if this script is in the container "MyTest".  In the
container "Application" I have some security settings applied to
certain objects but no difference regarding the script in question.
The Folder "MyTest" and "Application" are in the root Folder where
the MailHost object is stored so the aquisition rule should be the
same because there is no additional MailHost object.

If I use the "Test" tab in "/Application/TestMailScript" a login
screen is provided and if I use my valid login I get:

     Zope Error
     Zope has encountered an error while publishing this resource.

     Error Type: Unauthorized
     Error Value: You are not allowed to access send in this context

Any hint which combination of security settings might cause such a behaviour?
(I'm using Zope 2.6.2 under Debian GNU/Linux.)

Kind regards

         Andreas.




More information about the Zope mailing list