Limit classes that can be created in a subtree

Author Message

Willo van der Merwe

Monday 21 June 2004 1:55:25 am

Hi,

We're trying to build a site that allows the user to add content from the front end, but each folder should contain a certain set of classes only. How do we go about enforcing this? I've had a look at the different data types, but none seem to allow this.

Regards

Willo van der Merwe

James Packham

Monday 21 June 2004 3:56:09 am

Have a look at the role module - in the admin interface under user tab. This lets you specify what users can and cannot do.

Regards,

James

Willo van der Merwe

Tuesday 22 June 2004 12:17:48 am

Hi James,

Ok, I didn't think of using the roles and sections. That could work.

How do I conditionally add the "Add a new XXX" button depending on the role rights? I don't want to hard code it into the section template, as I'd like the admin to be able to define new classes on the fly.

Any help would be apreciated.

Willo van der Merwe

Vidar Langseid

Tuesday 22 June 2004 2:18:26 am

When you have the nodeobject, you can do like this to get a list of classes you have permission to create:

{$node.object.can_create_class_list|attribute(show)}

Willo van der Merwe

Thursday 01 July 2004 3:16:40 am

That's great but according to http://ez.no/community/bug_reports/node_object_can_create_class_list_does_not_honor_role_settings it's not going to honour the node settings. How am I going to get round this?

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

eZ debug

Timing: Jan 14 2025 21:26:59
Script start
Timing: Jan 14 2025 21:26:59
Module start 'layout'
Timing: Jan 14 2025 21:26:59
Module start 'content'
Timing: Jan 14 2025 21:27:00
Module end 'content'
Timing: Jan 14 2025 21:27:00
Script end

Main resources:

Total runtime0.8706 sec
Peak memory usage6,144.0000 KB
Database Queries65

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0056 684.8594183.7031
Module start 'layout' 0.00570.0032 868.562552.5938
Module start 'content' 0.00890.8600 921.15631,812.4922
Module end 'content' 0.86880.0018 2,733.648468.5078
Script end 0.8706  2,802.1563 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00620.7101160.0004
Check MTime0.00140.1636160.0001
Mysql Total
Database connection0.00070.084310.0007
Mysqli_queries0.808792.8911650.0124
Looping result0.00090.1053630.0000
Template Total0.831795.520.4158
Template load0.00490.567320.0025
Template processing0.826794.954420.4134
Template load and register function0.00150.172510.0015
states
state_id_array0.00130.145110.0013
state_identifier_array0.00160.186320.0008
Override
Cache load0.00440.5101230.0002
Sytem overhead
Fetch class attribute can translate value0.00080.086230.0003
Fetch class attribute name0.00240.276860.0004
XML
Image XML parsing0.00100.114330.0003
class_abstraction
Instantiating content class attribute0.00000.001660.0000
General
dbfile0.00080.0938160.0001
String conversion0.00000.001240.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 14
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs