<?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 ACL + automation chain : Document.SetACL doesn't use MVEL (user) as i would in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/acl-automation-chain-document-setacl-doesn-t-use-mvel-user-as-i/m-p/320147#M7148</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I tested this code on Nuxeo 5.6&lt;/P&gt;
&lt;P&gt;&lt;A href="http://doc.nuxeo.com/display/Studio/Move+a+Document+with+security+constraints" target="test_blank"&gt;http://doc.nuxeo.com/display/Studio/Move+a+Document+with+security+constraints&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Document.SetACL :&lt;/P&gt;
&lt;P&gt;It's impossible to use MVEL language on attribute "user" even if there is a MVEL selector near this attribute.&lt;/P&gt;
&lt;P&gt;Endeed, i tested it and saw that every MVEL code is not interpretade by the server.&lt;/P&gt;
&lt;P&gt;This is a big probleme because set.acl became unusefull. It's impossible to use it only with "constantes values".&lt;/P&gt;
&lt;P&gt;Example: @{Context.principal.name} or @{CurrentUser.principal.name} or @{Context["thisuser"]}&lt;/P&gt;
&lt;P&gt;Do you have the same problem ?&lt;/P&gt;
&lt;P&gt;Do you know where to find the java code of this operation?
thanks&lt;/P&gt;
&lt;P&gt;ps - modification: I translated my question in English + completed with the example&lt;/P&gt;
&lt;P&gt;ps, le code existant de set.acl:
&lt;A href="http://hg.nuxeo.org/nuxeo/nuxeo-features/diff/0cc0116fde8a/nuxeo-automation/nuxeo-automation-core/src/main/java/org/nuxeo/ecm/automation/core/operations/document/SetDocumentACE.java" target="test_blank"&gt;http://hg.nuxeo.org/nuxeo/nuxeo-features/diff/0cc0116fde8a/nuxeo-automation/nuxeo-automation-core/src/main/java/org/nuxeo/ecm/automation/core/operations/document/SetDocumentACE.java&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 16 Jan 2013 16:36:48 GMT</pubDate>
    <dc:creator>milonette_</dc:creator>
    <dc:date>2013-01-16T16:36:48Z</dc:date>
    <item>
      <title>ACL + automation chain : Document.SetACL doesn't use MVEL (user) as i would</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/acl-automation-chain-document-setacl-doesn-t-use-mvel-user-as-i/m-p/320147#M7148</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I tested this code on Nuxeo 5.6&lt;/P&gt;
&lt;P&gt;&lt;A href="http://doc.nuxeo.com/display/Studio/Move+a+Document+with+security+constraints" target="test_blank"&gt;http://doc.nuxeo.com/display/Studio/Move+a+Document+with+security+constraints&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Document.SetACL :&lt;/P&gt;
&lt;P&gt;It's impossible to use MVEL language on attribute "user" even if there is a MVEL selector near this attribute.&lt;/P&gt;
&lt;P&gt;Endeed, i tested it and saw that every MVEL code is not interpretade by the server.&lt;/P&gt;
&lt;P&gt;This is a big probleme because set.acl became unusefull. It's impossible to use it only with "constantes values".&lt;/P&gt;
&lt;P&gt;Example: @{Context.principal.name} or @{CurrentUser.principal.name} or @{Context["thisuser"]}&lt;/P&gt;
&lt;P&gt;Do you have the same problem ?&lt;/P&gt;
&lt;P&gt;Do you know where to find the java code of this operation?
thanks&lt;/P&gt;
&lt;P&gt;ps - modification: I translated my question in English + completed with the example&lt;/P&gt;
&lt;P&gt;ps, le code existant de set.acl:
&lt;A href="http://hg.nuxeo.org/nuxeo/nuxeo-features/diff/0cc0116fde8a/nuxeo-automation/nuxeo-automation-core/src/main/java/org/nuxeo/ecm/automation/core/operations/document/SetDocumentACE.java" target="test_blank"&gt;http://hg.nuxeo.org/nuxeo/nuxeo-features/diff/0cc0116fde8a/nuxeo-automation/nuxeo-automation-core/src/main/java/org/nuxeo/ecm/automation/core/operations/document/SetDocumentACE.java&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jan 2013 16:36:48 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/acl-automation-chain-document-setacl-doesn-t-use-mvel-user-as-i/m-p/320147#M7148</guid>
      <dc:creator>milonette_</dc:creator>
      <dc:date>2013-01-16T16:36:48Z</dc:date>
    </item>
    <item>
      <title>Re: ACL + automation chain : Document.SetACL doesn't use MVEL (user) as i would</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/acl-automation-chain-document-setacl-doesn-t-use-mvel-user-as-i/m-p/320148#M7149</link>
      <description>&lt;P&gt;What exact parameters are you using in your operation? MVEL usage is generic in operations, it should work everywhere.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jan 2013 15:42:49 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/acl-automation-chain-document-setacl-doesn-t-use-mvel-user-as-i/m-p/320148#M7149</guid>
      <dc:creator>Florent_Guillau</dc:creator>
      <dc:date>2013-01-18T15:42:49Z</dc:date>
    </item>
    <item>
      <title>Re: ACL + automation chain : Document.SetACL doesn't use MVEL (user) as i would</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/acl-automation-chain-document-setacl-doesn-t-use-mvel-user-as-i/m-p/320149#M7150</link>
      <description>&lt;P&gt;thank you for your answer.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jan 2013 16:24:54 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/acl-automation-chain-document-setacl-doesn-t-use-mvel-user-as-i/m-p/320149#M7150</guid>
      <dc:creator>milonette_</dc:creator>
      <dc:date>2013-01-18T16:24:54Z</dc:date>
    </item>
    <item>
      <title>Re: ACL + automation chain : Document.SetACL doesn't use MVEL (user) as i would</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/acl-automation-chain-document-setacl-doesn-t-use-mvel-user-as-i/m-p/320150#M7151</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I solved this problem with this explanation:&lt;BR /&gt;/&amp;gt;
A) used @{CurrentUser.name} (thanks nuxeo team help) for saving current user login
&lt;BR /&gt;/&amp;gt;
B) acl are visibled on "inheritance right" view in the interface&lt;/P&gt;
&lt;P&gt;Context: &lt;BR /&gt;/&amp;gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;A user lamba has no right on a workspace. &lt;BR /&gt;/&amp;gt;&lt;/LI&gt;
&lt;LI&gt;An automation chain has to add TEMPORARY rights to allowed adding a file in this workspace&lt;BR /&gt;/&amp;gt;&lt;/LI&gt;
&lt;LI&gt;and grant the ReadWrite right on this created file.&lt;/LI&gt;
&lt;/UL&gt;
&lt;OL&gt;
&lt;LI&gt;SOLUTION OF RIGHT TO USE "SET ACL"&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;User lambda has no permission to use set.acl operation.&lt;BR /&gt;/&amp;gt;
==&amp;gt; Need to LoginAs temporary as Administrator.&lt;BR /&gt;/&amp;gt;
==&amp;gt; but save the "login" of the currentUser, first.&lt;BR /&gt;/&amp;gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Save user login :
Execution Context || Set Context Variable || name=loginUser ; value=@{CurrentUser.originatingUser!=null &amp;amp;&amp;amp; CurrentUser.originatingUser!=''?CurrentUser.originatingUser:CurrentUser.name}&lt;/LI&gt;
&lt;LI&gt;Users &amp;amp; Group || Login As || name=Administrator 	 &lt;BR /&gt;/&amp;gt;&lt;/LI&gt;
&lt;LI&gt;Do set.acl operations HERE on @{loginUser}. &lt;BR /&gt;/&amp;gt;&lt;/LI&gt;
&lt;LI&gt;Users &amp;amp; Group || Logout &lt;BR /&gt;/&amp;gt;&lt;/LI&gt;
&lt;LI&gt;Do operations for current user. &lt;BR /&gt;/&amp;gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;OL start="2"&gt;
&lt;LI&gt;SOLUTION OF WHICH ACL CHOOSE TO ADD A FILE IN A WORKSPACE WITHOUT ANY RIGHT&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;Need 2 rights:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Document || Set ACL || permission=ReadWrite ; user=@{loginUser} ; acl=new ; grant=true ; overwrite=true&lt;/LI&gt;
&lt;LI&gt;Document  || Set ACL  || permission=AddChildren ; user=@{loginUser} ; acl=new ; grant=true ; overwrite=true
&lt;BR /&gt;/&amp;gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;OL start="3"&gt;
&lt;LI&gt;SOLUTION OF DELETE TEMPORARY ACL&lt;/LI&gt;
&lt;/OL&gt;
&lt;UL&gt;
&lt;LI&gt;Need to keep an ACL on the created file =&amp;gt; set field acl="local" or acl="othervalue" has you need.&lt;/LI&gt;
&lt;LI&gt;remove ACL "new" with the workspace where you had right, as INPUT for "remove ACL"
&lt;UL&gt;
&lt;LI&gt;Document || Remove ACL || acl=new&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Hope it helps&lt;/P&gt;
&lt;P&gt;Milonette&lt;/P&gt;</description>
      <pubDate>Wed, 13 Feb 2013 14:26:13 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/acl-automation-chain-document-setacl-doesn-t-use-mvel-user-as-i/m-p/320150#M7151</guid>
      <dc:creator>milonette_</dc:creator>
      <dc:date>2013-02-13T14:26:13Z</dc:date>
    </item>
  </channel>
</rss>

