Forums / Developer / Content type and rights

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
[email protected] | 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