[Zope] users, properties and roles
Terry Hancock
hancock at anansispaceworks.com
Thu Jun 17 12:26:11 EDT 2004
On Wednesday 16 June 2004 02:02 pm, John Hunter wrote:
> I'm a bit rusty on the zope API. I'm overriding addUser in the
> SimpleUserFolder
>
> def addUser(self, name, password, roles, domains, **kw):
> pass
>
> What is the zope magic that would allow me to create a folder named
> "name" in Users where Users is a plain vanilla folder in the same
> container that the SimpleUserFolder is located in?
>
> I know I need something like
>
> container.manage_addFolder(name)
>
> but I don't know how to get the container in the zope API?
I know this is going to come as a shocker, but it's called
"container". :-D
Seriously, if you want the folder in which a Python Script is
located, you want "container". If you want the folder in whose
context the script was called (i.e. by acquisition), then you
want "context".
So, in fact you just wrote what you need -- try it as is.
Cheers,
Terry
--
Terry Hancock ( hancock at anansispaceworks.com )
Anansi Spaceworks http://www.anansispaceworks.com
More information about the Zope
mailing list