[Zope] ExternalMethod - add new parameter

Dieter Maurer dieter at handshake.de
Tue Apr 8 14:34:05 EDT 2008

rishi pathak wrote at 2008-4-8 18:03 +0530:
>             I dont have a need to run all the external method as root, only
>some of them. For this what I was thinking was to introduce a new control
>apart from the regular ones.

Apparently, my previous message has not been clear enough.

Let's try again:

  The effect of changing the effective user (e.g. to "root")
  is not restricted to
  a single thread but affects all threads in the current process.

  If you do this in one of your ExternalMethod's, all Zope requests
  start to be executed with root as effective user -- even those
  not executing your ExternalMethod.

  If at the end of your ExternalMethod, you switch back to
  the former user, the complete Zope process switches back -- even
  (other) requests that are currently executing an ExternalMethod
  that should run as root -- and which is likely to fail therefore.

I hope the description should show you that this is the wrong
approach. Please read my previous message (and other messages in this
thread) to learn about alternatives.


More information about the Zope mailing list