I've created a product with zClasses that includes a script. The script must create a file in the current directory and then send a notification e-mail. (I put the MailHost instance in the product also.) I set the manager proxy on the script so that it would have sufficient access when run anonymously, but it didn't seem to work. The weird thing is that the script has enough rights to create the file -- so the proxy thing is obviously happening -- but it can't send the e-mail. Instead I get an unauthorized error: You are not allowed to access 'send' in this context. My guess is that the fact that this script is running within a zClass product is somehow restricting some, but not all, of the rights. That doesn't shock me, but the vital question is "How the heck do I make sure that my product has enough rights to send e-mail?" I tried to install that VerboseSecurity package, but I guess I didn't do it correctly because the error messages and log messages have no changed. They give me no new information about the problem. Can anyone out there please give me a quick step-by-step of what I have to change so that my product will have the right to send e-mail? Thanks in advance, Gre7g
Yay! I solved this one. I'll post the answer here in case anyone searches the archives with a similar problem. The trick was to go to the MailHost definition within the product's methods and click on the "Define permissions" tab. Scroll down to the entry "Use mailhost services" and change the pulldown from "(disabled)" to "Use mailhost services". On 14 Mar 2005 at 23:45, Gre7g Luterman wrote:
I've created a product with zClasses that includes a script. The script must create a file in the current directory and then send a notification e-mail. (I put the MailHost instance in the product also.) I set the manager proxy on the script so that it would have sufficient access when run anonymously, but it didn't seem to work.
The weird thing is that the script has enough rights to create the file -- so the proxy thing is obviously happening -- but it can't send the e-mail. Instead I get an unauthorized error: You are not allowed to access 'send' in this context.
My guess is that the fact that this script is running within a zClass product is somehow restricting some, but not all, of the rights. That doesn't shock me, but the vital question is "How the heck do I make sure that my product has enough rights to send e-mail?"
I tried to install that VerboseSecurity package, but I guess I didn't do it correctly because the error messages and log messages have no changed. They give me no new information about the problem.
Can anyone out there please give me a quick step-by-step of what I have to change so that my product will have the right to send e-mail?
Thanks in advance,
Gre7g _______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
participants (1)
-
Gre7g Luterman