Limiting data resources

Author Message

Mauro Innocenti

Friday 25 March 2005 2:41:34 am

I'm testing eZ in a linux box (Apache+PHP+MySQL).

I would want to limit in some way the data resources available to eZ (with limits configurable separately for each siteaccess...).
The scope of this is limiting the amount of data (folders, articles, files, etc.) the users my submit in a single siteaccess.

Thanks for any suggestion.

Bård Farstad

Tuesday 12 April 2005 12:46:52 am

Mauro,

eZ publish has current no function for limiting the amount of data you can insert. To create a limit for this you need to alter the function which creates new objects. This is located in kernel/content/action.php. Search for $class->instantiate(). This is the function which creates the actual object. Here you can add a limitation check to prevent creation of more than x objects.

--bård

Documentation: http://ez.no/doc

Mauro Innocenti

Wednesday 13 April 2005 1:29:41 am

Thank You Bård,
hacking the kernel functions is the powerful solution.

I think an alternate solution is creating a cron script (or adding some stuff to "cronjobs") for testing regularly the resource compsuntion of sites and limiting accordly the roles for users (no creation and no upload).

Anyway, what is Your ideas for the much useful "test or resource usage" for a single siteaccess (filesystem usage, DB usage, cache, ...)?

Xavier Dutoit

Thursday 14 April 2005 7:19:21 am

Hi Mauro,

Could you describe us the scenario of when you'd like to limit the amount of "things" created ?

If this is a commercial limitation (no more than X on the small pack), then I think that the easier to understand is the number of items (articles, folders...).

If this is a technical one, the size is the thing to monitor, then that's probably the size of the uploaded elements (files, images or multimedia) that matters.

Anyway, a not too bad place could be in an event in the publication workflow (before), isn't it ?

X+

http://www.sydesy.com

Mauro Innocenti

Thursday 14 April 2005 7:48:13 am

Hi X,
I want a technical (size) limitation.

My scenario is very similar to a "quota" limit (much like the "user quota" on Linux filesystems), in which I want to limit the total amount of data the users of a single siteaccess may own.
I want to be possible give to my users the equivalent of "max X MB of web space" for single web site.

I must read much carefully the workflow documentation...

Thanks.

Mauro

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.