Add permission when clicking on Reassign task

I'm using Nuxeo IDE 7.10 , i want to add a permission to the current user when clicking on reassign task button(Workflow). Maybe i should use the operation Document.AddPermission but i don't know how, can you tell how to do this ?

Here is the widget of the button :

<widget name="reassign_task_widget" type="documentActionWithForms">
        <fields>
          <field>#{routingTaskActions.getTaskInfo(layoutValue,
            true)}
          </field>
        </fields>
        <properties widgetMode="any">
          <property name="actionId">reassignTask</property>
          <property name="actionStyleClass">smallButton</property>
          <property name="actionsDisplay">buttons</property>
          <property name="useAjaxForm">true</property>
          <property name="ignoreTemplateProperty">true</property>
          <property name="actionContextDocument">#{layoutValue.getDocument()}
          </property>
        </properties>
        <widgetModes>
          <mode value="any">#{routingTaskActions.canBeReassign()?'edit':'hidden'}
          </mode>
      </widget>
0 votes

0 answers

913 views

ANSWER