Forums / Developer / Modify a node without creator modification

Modify a node without creator modification

Author Message

Fabien Audin

Tuesday 06 April 2010 1:24:31 am

Hello,

I have one problem with ezpublish. I want to give different rights to users. They can edit their own articles. But the administrator can edit them because of its status. If the administrator edit a user's article, the creator id is modified and the creator at the beginning cannot modify it again.

Do you understand my question and do you have any idea for that?

Thanks in advance

Nicolas Pastorino

Tuesday 06 April 2010 3:12:28 am

Hello Fabien, and welcome in the eZ Community !

About your question : are you talking about a workflow process (approval for instance) ?

Let us know so that we can further help you,
Cheers,

--
Nicolas Pastorino
Director Community - eZ
Member of the Community Project Board

eZ Publish Community on twitter: http://twitter.com/ezcommunity

t : http://twitter.com/jeanvoye
G+ : http://plus.tl/jeanvoye

Fabien Audin

Tuesday 06 April 2010 4:53:16 am

Thanks for your reply.

I'm talking about the workflow which is launched when you modify an article (for example) in the public website not from the administration panel.

I read something about a creator_id and an owner_id. Is there a difference between both? Are they same?

I just want to conserv the first creator's id.

Fabien Audin

Tuesday 06 April 2010 7:22:49 am

I have found the problem.

If you have an "test", test.contentobject_version_object.creator.id (the contentobject_id) is modified when somebody modifies an article. But the test.object.owner.id (the contentobject_id) do not change. It's the id of the first article's creator => the OWNER.

It's quite misleading. But in my case I need the test.object.owner.id to make my website work.

Question : do you know how can I get the owner's node_id, because test.object.owner.id return the contentobject_id

Thanks a lot

Nicolas Pastorino

Tuesday 06 April 2010 7:44:52 am

"

Question : do you know how can I get the owner's node_id, because test.object.owner.id return the contentobject_id

"

Hi Fabien,

You need to do something like this :

{def $ownerNodeId=$test.object.owner.main_node_id}

Hope it helps,
Cheers,

--
Nicolas Pastorino
Director Community - eZ
Member of the Community Project Board

eZ Publish Community on twitter: http://twitter.com/ezcommunity

t : http://twitter.com/jeanvoye
G+ : http://plus.tl/jeanvoye

Fabien Audin

Tuesday 06 April 2010 8:09:59 am

Hi Nicolas,

Ok thank you very much for your replies.

Bye