Content type and rights

Author Message

Maxime Thomas

Thursday 29 July 2010 2:58:12 am

Hi all,

I have to develop a feature and I have really no idea on how to proceed, maybe you could help. Here's the need of my customer :

An article page is a content made of around 40 attributes (Text line, Rich text, Images and so on).

In this content type, my customer would like to have the following features :

- Being able to edit a "Paragraph" sub content inside the edit form of the Article one. A "Paragraph" is a content with 20 attributes.

- Being able to set up a limitation by attributes. E.g. Contributors A can modify attributes 1 to 10 and Contributors B can modify attributes 11 to 40.

Other points :

- The article has to contain everything (one interface and one page), Ajax is possible but no redirect or publish in three steps.

- Everything has to be versionnable : Article AND Paragraph.

- The version of eZ used is 4.3.

Thank you for any response.

Max

Maxime Thomas
maxime.thomas@wascou.org | www.wascou.org | http://twitter.com/wascou

Company Blog : http://www.wascou.org/eng/Company/Blog
Technical Blog : http://share.ez.no/blogs/maxime-thomas

Thiago Campos Viana

Thursday 29 July 2010 4:33:30 am

The fastest, and non-secure, solution is to create an override of the edit template and make some fields hidden to a group of users, but it could be bypassed with firebug.

Solution b is create an override of the edit template, make some fields hidden to a group of users, change the post action to a module you will create, this module will control the update of the object.

eZ Publish Certified Developer: http://auth.ez.no/certification/verify/376924

Twitter: http://twitter.com/tcv_br

gilles guirand

Monday 02 August 2010 5:25:21 am

Create 2 classes :

  • Article
  • Paragraph

And store your content like this :

Article1

  • Paragraph1
  • Paragraph2
  • Paragraph3

Set your rights & policies (for each content class)

Create an AJAX interface to add paragraph (like an AJAX comment system, like on my gandbox's blog AJAX comment system)

--
Gilles Guirand
eZ Community Board Member
http://twitter.com/gandbox
http://www.gandbox.fr

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 18 2025 01:59:34
Script start
Timing: Jan 18 2025 01:59:34
Module start 'layout'
Timing: Jan 18 2025 01:59:34
Module start 'content'
Timing: Jan 18 2025 01:59:35
Module end 'content'
Timing: Jan 18 2025 01:59:35
Script end

Main resources:

Total runtime1.3248 sec
Peak memory usage4,096.0000 KB
Database Queries59

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0061 587.9063152.6250
Module start 'layout' 0.00610.0033 740.531339.4453
Module start 'content' 0.00951.3139 779.9766598.6250
Module end 'content' 1.32340.0014 1,378.601612.1719
Script end 1.3248  1,390.7734 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.2521160.0002
Check MTime0.00140.1041160.0001
Mysql Total
Database connection0.00090.067610.0009
Mysqli_queries1.261095.1774590.0214
Looping result0.00090.0655570.0000
Template Total1.286997.120.6435
Template load0.00280.212220.0014
Template processing1.284196.925120.6421
Template load and register function0.00010.008510.0001
states
state_id_array0.00090.071610.0009
state_identifier_array0.00190.146720.0010
Override
Cache load0.00190.1440360.0001
Sytem overhead
Fetch class attribute can translate value0.00080.058130.0003
Fetch class attribute name0.00130.094560.0002
XML
Image XML parsing0.00190.141430.0006
class_abstraction
Instantiating content class attribute0.00000.000860.0000
General
dbfile0.00220.1694290.0001
String conversion0.00000.000740.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
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/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
2content/datatype/view/ezxmltags/strong.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/strong.tplEdit templateOverride template
2content/datatype/view/ezxmltags/li.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/li.tplEdit templateOverride template
2content/datatype/view/ezxmltags/ul.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/ul.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 19
 Number of unique templates used: 8

Time used to render debug report: 0.0001 secs