<?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 Re: Block permissions inheritance programatically in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/block-permissions-inheritance-programatically/m-p/316617#M3618</link>
    <description>&lt;P&gt;hello bruce, it doesn't seem to work, unless we are doing something wrong.&lt;/P&gt;</description>
    <pubDate>Mon, 30 Sep 2013 15:34:45 GMT</pubDate>
    <dc:creator>bledii_</dc:creator>
    <dc:date>2013-09-30T15:34:45Z</dc:date>
    <item>
      <title>Block permissions inheritance programatically</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/block-permissions-inheritance-programatically/m-p/316612#M3613</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;is it possible to block permission inheritance via API?&lt;/P&gt;
&lt;P&gt;When we try by resetting the ACP it seems not to work, and still permissions are inherited.&lt;/P&gt;
&lt;P&gt;Thank you&lt;/P&gt;
&lt;P&gt;EDIT: my use case is the following:&lt;/P&gt;
&lt;P&gt;i want to create a document (folder) inside a tree of other folders, but want only the creator and users from the admin group to have access on it&lt;/P&gt;</description>
      <pubDate>Thu, 26 Sep 2013 09:11:07 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/block-permissions-inheritance-programatically/m-p/316612#M3613</guid>
      <dc:creator>bledii_</dc:creator>
      <dc:date>2013-09-26T09:11:07Z</dc:date>
    </item>
    <item>
      <title>Re: Block permissions inheritance programatically</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/block-permissions-inheritance-programatically/m-p/316613#M3614</link>
      <description>&lt;P&gt;Don't know about the API, but you could create a listener for various document creation events (DOCUMENT_CREATED, DOCUMENT_CREATED_BY_COPY, DOCUMENT_DUPLICATED, etc.) and then remove inheritance and set default ACL.&lt;/P&gt;
&lt;P&gt;Something like...&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;DocumentRef docRef = docModel.getRef();
ACP acp = this.session.getACP(docRef);
						
// delete existing 'local' ACL 
acp.removeACL(ACL.LOCAL_ACL);

// block inheritance
acp.getOrCreateACL().add(new ACE(SecurityConstants.EVERYONE, SecurityConstants.EVERYTHING, false));

// and then create the local ACL entries you do want
ACL acl = acp.getOrCreateACL(ACL.LOCAL_ACL);
... and then create desired ACEs ...
acl.add(new ACE("testgroup","Read", true));
acp.addACL(acl);
this.session.setACP(docRef, acp, true);
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 27 Sep 2013 01:29:27 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/block-permissions-inheritance-programatically/m-p/316613#M3614</guid>
      <dc:creator>bruce_Grant</dc:creator>
      <dc:date>2013-09-27T01:29:27Z</dc:date>
    </item>
    <item>
      <title>Re: Block permissions inheritance programatically</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/block-permissions-inheritance-programatically/m-p/316614#M3615</link>
      <description>&lt;P&gt;hello Bruce&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2013 09:54:09 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/block-permissions-inheritance-programatically/m-p/316614#M3615</guid>
      <dc:creator>bledii_</dc:creator>
      <dc:date>2013-09-30T09:54:09Z</dc:date>
    </item>
    <item>
      <title>Re: Block permissions inheritance programatically</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/block-permissions-inheritance-programatically/m-p/316615#M3616</link>
      <description>&lt;P&gt;I added lines to above example to create ACE and then save updated ACL to doc - is this what you tried?&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2013 14:20:04 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/block-permissions-inheritance-programatically/m-p/316615#M3616</guid>
      <dc:creator>bruce_Grant</dc:creator>
      <dc:date>2013-09-30T14:20:04Z</dc:date>
    </item>
    <item>
      <title>Re: Block permissions inheritance programatically</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/block-permissions-inheritance-programatically/m-p/316616#M3617</link>
      <description>&lt;P&gt;hello bruce, thanks for the info,the main difference i can find is the override=true in setACP, will try that and get back to you with the result, thanks&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2013 15:07:14 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/block-permissions-inheritance-programatically/m-p/316616#M3617</guid>
      <dc:creator>bledii_</dc:creator>
      <dc:date>2013-09-30T15:07:14Z</dc:date>
    </item>
    <item>
      <title>Re: Block permissions inheritance programatically</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/block-permissions-inheritance-programatically/m-p/316617#M3618</link>
      <description>&lt;P&gt;hello bruce, it doesn't seem to work, unless we are doing something wrong.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2013 15:34:45 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/block-permissions-inheritance-programatically/m-p/316617#M3618</guid>
      <dc:creator>bledii_</dc:creator>
      <dc:date>2013-09-30T15:34:45Z</dc:date>
    </item>
    <item>
      <title>Re: Block permissions inheritance programatically</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/block-permissions-inheritance-programatically/m-p/316618#M3619</link>
      <description>&lt;P&gt;The only other thing I can think is that I have this code running in a class that extends UnrestrictedSessionRunner so it has fully trusted status&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2013 15:37:32 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/block-permissions-inheritance-programatically/m-p/316618#M3619</guid>
      <dc:creator>bruce_Grant</dc:creator>
      <dc:date>2013-09-30T15:37:32Z</dc:date>
    </item>
    <item>
      <title>Re: Block permissions inheritance programatically</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/block-permissions-inheritance-programatically/m-p/316619#M3620</link>
      <description>&lt;P&gt;bruce, i am going to accept your answer as it pointed me in the right direction, thank you&lt;/P&gt;</description>
      <pubDate>Thu, 03 Oct 2013 11:02:56 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/block-permissions-inheritance-programatically/m-p/316619#M3620</guid>
      <dc:creator>bledii_</dc:creator>
      <dc:date>2013-10-03T11:02:56Z</dc:date>
    </item>
    <item>
      <title>Re: Block permissions inheritance programatically</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/block-permissions-inheritance-programatically/m-p/316620#M3621</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;</description>
      <pubDate>Fri, 04 Oct 2013 10:01:53 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/block-permissions-inheritance-programatically/m-p/316620#M3621</guid>
      <dc:creator>vieville_</dc:creator>
      <dc:date>2013-10-04T10:01:53Z</dc:date>
    </item>
    <item>
      <title>Re: Block permissions inheritance programatically</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/block-permissions-inheritance-programatically/m-p/316621#M3622</link>
      <description>&lt;P&gt;@vieville Automation is a different matter, please ask a new question.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Oct 2013 12:22:58 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/block-permissions-inheritance-programatically/m-p/316621#M3622</guid>
      <dc:creator>Florent_Guillau</dc:creator>
      <dc:date>2013-10-04T12:22:58Z</dc:date>
    </item>
    <item>
      <title>Re: Block permissions inheritance programatically</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/block-permissions-inheritance-programatically/m-p/316622#M3623</link>
      <description>&lt;P&gt;Hey Bruce,&lt;/P&gt;</description>
      <pubDate>Wed, 04 Nov 2015 13:54:17 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/block-permissions-inheritance-programatically/m-p/316622#M3623</guid>
      <dc:creator>Anurag_Kumar</dc:creator>
      <dc:date>2015-11-04T13:54:17Z</dc:date>
    </item>
  </channel>
</rss>

