Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Updating component field while publishing the component

We are updating component field while publishing the component, eg. When the component is getting published we want to update current date time to PublishDate field of the component. We have written this code in .net assembly(c#). While publishing component is getting failed with an error "You do not have permission to perform this action"

We used to do this in vbscript templates but we are migrating to compound template there we are facing this issue.

like image 941
user1453602 Avatar asked Dec 13 '12 08:12

user1453602


2 Answers

Tridion 2011 no longer allows publishing or editing other items from templating code by default.

However, it can be activated by modifying the allowWriteOperationsInTemplates attribute on the Tridion.ContentManager.Config file:

<tridion.contentmanager.security allowAutomaticUserCreation="true" hideOrganizationalItemsNoAccess="false" allowWriteOperationsInTemplates="true">
like image 192
Puntero Avatar answered Nov 08 '22 06:11

Puntero


I believe that out of the box Tridion 2011 does not allow the templates to make any changes to items. This behavior can be overridden in the configuration. If anyone would know how to do this exactly, please add the info, since I cannot find it in the docs.

like image 23
Quirijn Avatar answered Nov 08 '22 05:11

Quirijn