[Product-Developers] semi n00b-question: how to enable vanilla users the right to add stuff tomy custom folder?

Gilles Lenfant gilles.lenfant at ingeniweb.com
Wed Feb 20 14:25:05 UTC 2008


Le 20 févr. 08 à 14:43, Per Erik Strandberg a écrit :

> Hi plone product developers list!
>
> [sorry if I sent this message twice - the first message seems to have
> been sent to /dev/null]

Have a look at your content types in the types tool portal_types, and  
see if the python setup goes correctly to the factories.

BTW, you should write...

allowed_content_types = ('SimpleThing',) # Note the ","

"allowed_content_types" is supposed to be a sequence of strings  
(portal type names), not a single string. That's perhaps your bug.

HTH
-- 
Gilles Lenfant
INGENIWEB (TM) - SAS 50000 Euros - RC B 438 725 632
17 rue Louise Michel - 92300 Levallois Perret - France
Tel / Fax : 01.78.15.24.00
web : www.ingeniweb.com - « les Services Web Ingénieux »


>
>
> I want to know the minimalist way of giving regular vanilla users the
> right to add stuff to my custom content type.
>
> When I try the sharing tab it does not work. I am deeply annoyed that
> there is a sharing tab when it has no or only limited effect :(
>
> The complete plone product is now about 100 lines of code (pasted  
> here:
> http://paste.plone.org/19594 ) and the content types are as small as I
> could make them:
>
> ------
> # import bla bla bla
>
> class SimpleFolder(BaseFolder):
>    schema = BaseSchema.copy() +  Schema(())
>    allowed_content_types = ('SimpleThing')
>
>    filter_content_types = 1
>    _at_rename_after_creation = True
>
> registerType(SimpleFolder, PROJECTNAME)
>
>
> class SimpleThing(BaseContent):
>    schema = BaseSchema.copy() + Schema(())
>    _at_rename_after_creation = True
>    global_allow = 0
>
> registerType(SimpleThing, PROJECTNAME)
> ------
>
> Some screenshots and more text is available in this tutorial-to-be:
> http://www.pererikstrandberg.se/blog/index.cgi?page=PloneSimpleFolderAndPermissions
>
> Any hints or pointers are appreciated, thanks
>
> /Per
>
> -- 
> Per Erik Strandberg, M.Sc, M.Sc
> System Developer
>
> International Neuroinformatics Coordinating Facility
> Secretariat
> Karolinska Institutet
> Nobels väg 15A
> SE-171 77 Stockholm
> Sweden
>
>
>
>
> _______________________________________________
> Product-Developers mailing list
> Product-Developers at lists.plone.org
> http://lists.plone.org/mailman/listinfo/product-developers






More information about the Product-Developers mailing list