[Zope-CMF] Re: How-To: Automatically Add Objects at CMF
Member Creation Time
Grégoire Weber
gregoire.weber@switzerland.org
Wed, 22 Aug 2001 09:42:04 +0200
The same message, but now also copied to the list :-)
Hi Josh,
I've had a short look into the code and I am not 100% sure when and
in which context this afterAdd method gets called.
Did you put something into this method and it didn't work? What did
you do exactly? What do you mean with administrator -- the manager
user? Do you want to put all theses objects as files in the filesystem
or in the ZODB (I would prefer a skin directory [1])?
I am wondering if it is the right place to put the things you want.
Normaly (in the Zope core) these kind of afterAdd method are called
to catalog objects etc.
Perhaps this is a question for Tres? Or was this question answered in
former list contributions already? I am sure he already has an idea
where to put this feature you and a lot of other people want.
I could investigate on this a little, but not before the begin of
next week. What I would do is drawing a kind of 'calling tree' upon
member creation.
Greg
[1] Exactly, I would prefer a dropdown list in the Metadata Tool in the
ZMI (Zope Management Interface) where I can first choose a skin from a list
of all available skins and second the skin directory containing the objects
I want to be copied upon member creation time.
At 21:15 21.08.01 -0700, you wrote:
> Greg,
>
> I have been trying to get this to work correctly. I have been having
> trouble getting it called. I think I don't quite understand how to get a
> method called in the afterAdd method. I thought I could just put some code
> there and it would always run for me. Evidently this is not the case.
>
> What I would really like to achieve with this is to have it run when ever=
a
> user is created. More so, it would go through a directory that is readily
> available to an administrator who could add items to the list he would=
like
> to see populate at creation. This would include/exclude things like:
>
> index_html
> image
> document
>
> or any other valid object type. Then he could then decide which items the
> user could or could not modify.
>
> Next I would also like to see in this directory a default user. This user
> object would be special in that you could modify this object and it would=
be
> template for all users create afterwards. The advantage here is that I
> could add an attribute to all newly created users of the name email. Then=
I
> could populate that attribute when I create the user or have the user=
modify
> it. This would allow for me to have it go with the user. Currently I=
don't
> see how I would achieve this. Ideas?
>
> This is how I envision how it would work. I'm trying to design it so that
> anyone(admin level) could modify one directory and that would change all=
new
> users. This person would then know which objects to expect to be present.
>
> Any suggestions welcomed.
>
> Josh
>
_____________________________________
Grégoire Weber
Rigistr. 31
CH-8006 Zürich
Switzerland
phone: +41-(0)1-361 66 11
mobile: +41-(0)79-44 11 457
mailto:gregoire.weber@switzerland.org