<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Problem whith Privilege 'AddChildren' is not granted in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/problem-whith-privilege-addchildren-is-not-granted/m-p/317173#M4174</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I created one document the type (MissionNotification in Studio) with  Extends = Document and Category = Miscellaneous, this document will be created when the other Document change the life cycle.&lt;/P&gt;
&lt;P&gt;For this, I created an EventHandler with the code below :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;public void process ( DocumentModel doc , CoreSession session ) throws ClientException {
    doc.getPathAsString ();
    DocumentModel notified session.createDocumentModel = ( " / default -domain " , doc.getTitle ( ) , " MissionNotification " ) ;
    notifi.setPropertyValue ( " dc: title " , doc.getTitle ( ) ) ;
    notifi.setPropertyValue ( " missionnotification : mission ," doc.getId ( ) ) ;
    Doc.getCurrentLifeCycleState String state = ( ) ;
    notifi.setPropertyValue ( " missionnotification : state " , state) ;
    notifi.setPropertyValue ( " missionnotification : fromState ",  Utils.getFromStateOfMission ( state) ) ;
    notifi.setPropertyValue ( " missionnotification : contributors ",  doc.getPropertyValue ( "dc : contributors "));
    notifi.setPropertyValue ( " missionnotification : responsible", doc.getPropertyValue ( " Mission : mission_responsible "));
    session.createDocument notification ( notification ) ;
    session.saveDocument notification ( notification ) ;
    session.save ( ) ;
}
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;When I try to create my ( document ) = session.createDocument notification ( notification ) ;&lt;/P&gt;
&lt;P&gt;happens the following error :&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;ERROR [ http - 0.0.0.0 - bio - 8080 - exec - 4 ] [ org.nuxeo.ecm.core.event.impl.EventServiceImpl ] Error during sync listener execution missionNotification , transaction will not be rolled back since event.markRollBack ( ) was not called by the Listener
org.nuxeo.ecm.core.api.DocumentSecurityException : Privilege ' addChildren ' is not granted to ' user1 '
at org.nuxeo.ecm.core.api.AbstractSession.checkPermission ( AbstractSession.java : 306 )
at org.nuxeo.ecm.core.api.AbstractSession.createDocument ( AbstractSession.java : 879 )
at org.br.ezute.event.MissionNotificationEventHandler.process ( MissionNotificationEventHandler.java : 58)
at org.br.ezute.event.MissionNotificationEventHandler.handleEvent(MissionNotificationEventHandler.java:33)
at org.nuxeo.ecm.core.event.impl.EventServiceImpl.fireEvent ( EventServiceImpl.java : 215)
at org.nuxeo.ecm.core.api.AbstractSession.fireEvent ( AbstractSession.java : 385 )
at org.nuxeo.ecm.core.api.AbstractSession.notifyEvent ( AbstractSession.java : 437)&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Only works when I 'm logged in as user with Administrator permission&lt;/P&gt;
&lt;P&gt;Could someone help me ?&lt;/P&gt;</description>
    <pubDate>Wed, 30 Apr 2014 17:20:29 GMT</pubDate>
    <dc:creator>klebervz_</dc:creator>
    <dc:date>2014-04-30T17:20:29Z</dc:date>
    <item>
      <title>Problem whith Privilege 'AddChildren' is not granted</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/problem-whith-privilege-addchildren-is-not-granted/m-p/317173#M4174</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I created one document the type (MissionNotification in Studio) with  Extends = Document and Category = Miscellaneous, this document will be created when the other Document change the life cycle.&lt;/P&gt;
&lt;P&gt;For this, I created an EventHandler with the code below :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;public void process ( DocumentModel doc , CoreSession session ) throws ClientException {
    doc.getPathAsString ();
    DocumentModel notified session.createDocumentModel = ( " / default -domain " , doc.getTitle ( ) , " MissionNotification " ) ;
    notifi.setPropertyValue ( " dc: title " , doc.getTitle ( ) ) ;
    notifi.setPropertyValue ( " missionnotification : mission ," doc.getId ( ) ) ;
    Doc.getCurrentLifeCycleState String state = ( ) ;
    notifi.setPropertyValue ( " missionnotification : state " , state) ;
    notifi.setPropertyValue ( " missionnotification : fromState ",  Utils.getFromStateOfMission ( state) ) ;
    notifi.setPropertyValue ( " missionnotification : contributors ",  doc.getPropertyValue ( "dc : contributors "));
    notifi.setPropertyValue ( " missionnotification : responsible", doc.getPropertyValue ( " Mission : mission_responsible "));
    session.createDocument notification ( notification ) ;
    session.saveDocument notification ( notification ) ;
    session.save ( ) ;
}
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;When I try to create my ( document ) = session.createDocument notification ( notification ) ;&lt;/P&gt;
&lt;P&gt;happens the following error :&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;ERROR [ http - 0.0.0.0 - bio - 8080 - exec - 4 ] [ org.nuxeo.ecm.core.event.impl.EventServiceImpl ] Error during sync listener execution missionNotification , transaction will not be rolled back since event.markRollBack ( ) was not called by the Listener
org.nuxeo.ecm.core.api.DocumentSecurityException : Privilege ' addChildren ' is not granted to ' user1 '
at org.nuxeo.ecm.core.api.AbstractSession.checkPermission ( AbstractSession.java : 306 )
at org.nuxeo.ecm.core.api.AbstractSession.createDocument ( AbstractSession.java : 879 )
at org.br.ezute.event.MissionNotificationEventHandler.process ( MissionNotificationEventHandler.java : 58)
at org.br.ezute.event.MissionNotificationEventHandler.handleEvent(MissionNotificationEventHandler.java:33)
at org.nuxeo.ecm.core.event.impl.EventServiceImpl.fireEvent ( EventServiceImpl.java : 215)
at org.nuxeo.ecm.core.api.AbstractSession.fireEvent ( AbstractSession.java : 385 )
at org.nuxeo.ecm.core.api.AbstractSession.notifyEvent ( AbstractSession.java : 437)&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Only works when I 'm logged in as user with Administrator permission&lt;/P&gt;
&lt;P&gt;Could someone help me ?&lt;/P&gt;</description>
      <pubDate>Wed, 30 Apr 2014 17:20:29 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/problem-whith-privilege-addchildren-is-not-granted/m-p/317173#M4174</guid>
      <dc:creator>klebervz_</dc:creator>
      <dc:date>2014-04-30T17:20:29Z</dc:date>
    </item>
    <item>
      <title>Re: Problem whith Privilege 'AddChildren' is not granted</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/problem-whith-privilege-addchildren-is-not-granted/m-p/317174#M4175</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;</description>
      <pubDate>Mon, 05 May 2014 17:55:06 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/problem-whith-privilege-addchildren-is-not-granted/m-p/317174#M4175</guid>
      <dc:creator>klebervz_</dc:creator>
      <dc:date>2014-05-05T17:55:06Z</dc:date>
    </item>
  </channel>
</rss>

