[Zope-CMF] New Portal Type

Bill Anderson bill@libc.org
19 Jul 2001 20:19:20 -0600


On 19 Jul 2001 10:16:44 +0100, Chris Withers wrote:
> Karim Yaici wrote:
> > 
> > I remember I had the same problem when trying to create a Factory-based
> > content type based on the Document type. Though I have changed the 'meta
> > type' to 'My Document' (in the portal_types form), it is still recording it
> > as Document.
> 
> Hehe, Tres, another one bitten ;-)
> 
> Karim,
> 
> The meta_type should never be changed, unless you actually change the meta_type
> of the python product the type is based on.

The problem is the form. The form says meta type, but it means 'Type'.
Fix the form, and this problem (bit me too) goes away.

On that note, the personalize_form need to check for a logged in user. As it sits
now, it will return an atrribute error if you are not logged in. I changed mine to 
check for Anonymous role, and if present, raise Unauthorized.

I'd supply a patch, but it is all of three lines, and those with CVS write access can 
propbably patch it in their sleep it is so simple. :)

Bill