Using Workflow to Enforce Quota

Best practice guidance required to implement a simple quota system

I would like to limit the number of times a Member can add a custom content type (called a token) to its member folder (I also created a custom member folder).

Use Case (limit the number of tokens added by the user):

Suppose our custom content type is called a token. It should be possible to set a limit on the number of tokens that can be added. For instance. the limit is set to 2. After adding two tokens to their member zone, they no longer have permission to add tokens further.

What am i considering

I look at DCWorkflow and wonder if there might be some kind of security condition. I also looked at the source code for the addon called quotaa, which uses the class / require zcml directive (code here: http://svn.plone.org/svn/collective/quota/trunk/configure.zcml ).

It seems that I may need to configure a member folder, rather than a workflow on the token itself. I would appreciate any guidance / recommendations on this.

+5
source share
3 answers

, , . , .

+5

You can also override the allowedContentTypes method of your member folder.

You can filter out any type of AT from the returned list based on what you want.

It's good that you also get the classic “add new” drop-down menu, updated with a list of types to add.

I did this in a project where I needed to limit the number of elements per group / role.

+2
source

All Articles