[Zope-CMF] Content types per role
Florent Guillaume
fg at nuxeo.com
Wed Jan 7 05:58:25 EST 2004
Yeah content types and how/where/who they are added is a big complex
mess.
Here's an overview of how it's done in CPS 3 to give you an idea.
In CPS 3 the thing that decides what type can be created in a container
is the workflow (having everything being decided by the workflow is one
of the fundamentals of CPS 3).
We have pseudo-transitions (basically normal DCWorkflow transitions)
whose guard can decide if creation is allowed or not. First the workflow
of the container is consulted to see if general creation of subobjects
is allowed (this means that you can restrict only certain roles in
certain folders). Second, the workflow of the to-be-created portal type
is consulted to see if there is a possibility of creation (this second
check, can obviously depend on the portal type because different
workflows may be associated to different portal types).
Note also an important thing, CPS 3 has placeful workflow association.
This way you can say "in this folder (and below), News follows this
workflow, which by the way allows it to be created only by
NewsManagers".
As a side note, checking which types can be created in a given container
is even more expensive than the current state of CMF ;-) as there are
lots of workflow guards to check.
But even with all this flexibility, we are faced with pretty standard
use cases that are not easily covered. For instance, having a different
workflow for each little variation of the creation rules is overkill and
results in duplication of most of the workflow. What we actually want is
have additionnal variables in the transition guards that can be used to
express the way that a given transition is only meaningful for certain
portal types.
Florent
In article <opr0cscon1vhba00 at here.no> you write:
> On Wed, 17 Dec 2003 17:31:54 -0600, alan runyan <runyaga at runyaga.com>
> wrote:
>
> > well. either in Plone or in CMF we need to allow Portal/Plone folders
> > to be able to
> > override this method to constrain what content types can be created per
> > Folder instance.
> > currently its too coarse grain for InfoArchitects to constrain what
> > content can be added to
> > specific folders (currently you end up w/ portal_type explosion).
>
> This touches on the #1 thing I would like to see in the CMF:
>
> Permissions for each content type, so you can restrict it so that only
> Managers can add MessageBoards, and one type (role) of user can only add
> Documents, while another can add Documents, Events and Images - as an
> example.
>
> I know little about the internals of CMF in this matter, but I've noticed
> that there's only a generic "Add portal content" permission.
>
> How hard would this be to fix in CMF 1.5 or 1.6?
>
> --
> __________________________________________________________________
>
> Alexander Limi · Interaction Architect · Plone Solutions
>
> Development · Training · Support · http://www.plonesolutions.com
> __________________________________________________________________
>
> Plone Co-Founder · http://plone.org · Connecting Content
>
> é«èå · ã¢ã¬ã¯ãµã³ãã¼ ãªã · ì´ë¯¸ì§± ·
> à¸à¹à¸¥à¹à¸à¸à¸²à¸à¹à¸à¸à¸£à¹ ลีมิ
>
> _______________________________________________
> Zope-CMF maillist - Zope-CMF at zope.org
> http://mail.zope.org/mailman/listinfo/zope-cmf
>
> See http://collector.zope.org/CMF for bug reports and feature requests
>
--
Florent Guillaume, Nuxeo (Paris, France)
+33 1 40 33 79 87 http://nuxeo.com mailto:fg at nuxeo.com
More information about the Zope-CMF
mailing list