[Zope-CMF] WorkFlow / Security advice
    Dieter Maurer 
    dieter at handshake.de
       
    Thu Mar 10 13:46:26 EST 2005
    
    
  
Florent Guillaume wrote at 2005-3-10 12:55 +0100:
> ...
>    newSecurityManager(None, tmp_user)
>    ### CALL YOUR METHOD HERE ###
>finally:
>    newSecurityManager(None, user)
Be warned that "newSecurityManager" kills your execution context.
You will loose any proxy roles...
The better way is to use:
    old_sm = getSecurityManager()
    newSecurityManager(None, tmp_user)
    ...
    setSecurityManager(old_sm)
"setSecurityManager" is defined in "AccessControl.SecurityManagement".
-- 
Dieter
    
    
More information about the Zope-CMF
mailing list