<?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 set file permission rest api in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/set-file-permission-rest-api/m-p/47643#M18697</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Friends&lt;/P&gt;&lt;P&gt;How can I set&amp;nbsp; read write permissions to file or node with alfresco REST API for individual users?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 16 May 2018 07:39:21 GMT</pubDate>
    <dc:creator>dadamia</dc:creator>
    <dc:date>2018-05-16T07:39:21Z</dc:date>
    <item>
      <title>set file permission rest api</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/set-file-permission-rest-api/m-p/47643#M18697</link>
      <description>Dear FriendsHow can I set&amp;nbsp; read write permissions to file or node with alfresco REST API for individual users?</description>
      <pubDate>Wed, 16 May 2018 07:39:21 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/set-file-permission-rest-api/m-p/47643#M18697</guid>
      <dc:creator>dadamia</dc:creator>
      <dc:date>2018-05-16T07:39:21Z</dc:date>
    </item>
    <item>
      <title>Re: set file permission rest api</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/set-file-permission-rest-api/m-p/47644#M18698</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check this post:&amp;nbsp;&lt;A __default_attr="188308" __jive_macro_name="thread" _jive_internal="true" class="jive_macro_thread jive_macro link-titled" href="https://community.alfresco.com/thread/188308-change-inherit-parent-space-permissions-using-resfull-api" rel="nofollow noopener noreferrer"&gt;&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this will be helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 May 2018 09:11:58 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/set-file-permission-rest-api/m-p/47644#M18698</guid>
      <dc:creator>jayesh_prajapat</dc:creator>
      <dc:date>2018-05-16T09:11:58Z</dc:date>
    </item>
    <item>
      <title>Re: set file permission rest api</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/set-file-permission-rest-api/m-p/47645#M18699</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The best way to understand the REST API is to take a look at the API Explorer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case, you'll find out that you can set local permissions by using the &lt;A href="https://api-explorer.alfresco.com/api-explorer/#!/nodes/updateNode" rel="nofollow noopener noreferrer"&gt;update node API&lt;/A&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 May 2018 20:21:31 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/set-file-permission-rest-api/m-p/47645#M18699</guid>
      <dc:creator>jpotts</dc:creator>
      <dc:date>2018-05-16T20:21:31Z</dc:date>
    </item>
    <item>
      <title>Re: set file permission rest api</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/set-file-permission-rest-api/m-p/47646#M18700</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;Hello Alfresco Community,&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;I'm using&lt;SPAN&gt;&amp;nbsp;alfresco-sdk-client&lt;/SPAN&gt;&lt;SPAN&gt; (developed byJean Marie Pascal and Gavin Cornwell).&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;I set successfully permission on file, but&amp;nbsp;I can not return permission object in Response object&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;My code:&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;List&amp;lt;PermissionElementRepresentation&amp;gt; users = new ArrayList&amp;lt;PermissionElementRepresentation&amp;gt;(); &lt;BR /&gt; PermissionElementRepresentation user = new PermissionElementRepresentation(); &lt;BR /&gt; user.setAuthorityId("dato");&lt;BR /&gt; user.setName("read");&lt;BR /&gt; user.setAccessStatus(AccessStatusEnum.ALLOWED);&lt;BR /&gt; users.add(user);&lt;BR /&gt; &lt;BR /&gt; PermissionsBodyUpdate permission = new PermissionsBodyUpdate(false, users);&lt;BR /&gt; NodeBodyUpdate permissionRequest = new NodeBodyUpdate(permission);&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;Response&amp;lt;NodeRepresentation&amp;gt; permissionResponse = nodeService.updateNodeCall(createdNodeResponse.body().getId(), permissionRequest)&lt;BR /&gt; .execute();&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;But in&amp;nbsp;&lt;SPAN&gt;permissionResponse&amp;nbsp;object the permission object is null&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN&gt;Please Help me&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 May 2018 05:51:16 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/set-file-permission-rest-api/m-p/47646#M18700</guid>
      <dc:creator>dadamia</dc:creator>
      <dc:date>2018-05-17T05:51:16Z</dc:date>
    </item>
    <item>
      <title>Re: set file permission rest api</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/set-file-permission-rest-api/m-p/47647#M18701</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I successfully resolve this problem:&lt;/P&gt;&lt;P&gt;I add two arguments&amp;nbsp;IncludeParam and&amp;nbsp;FieldsParam to&amp;nbsp;nodeService.updateNodeCall function and get expected result:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;List&amp;lt;String&amp;gt; fieldPermission = new ArrayList&amp;lt;&amp;gt;();&lt;BR /&gt; fieldPermission.add("permissions");&lt;BR /&gt; IncludeParam fieldValues = new IncludeParam(fieldPermission);&lt;BR /&gt; FieldsParam field = new FieldsParam(fieldPermission);&lt;BR /&gt; Response&amp;lt;NodeRepresentation&amp;gt; permissionResponse = nodeService.updateNodeCall(createdNodeResponse.body().getId(), permissionRequest, fieldValues, field)&lt;BR /&gt; .execute();&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; Assert.assertEquals(permissionResponse.body().getPermissions().getLocallySet(), users, "Permission is wrong");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks All&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 May 2018 06:18:28 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/set-file-permission-rest-api/m-p/47647#M18701</guid>
      <dc:creator>dadamia</dc:creator>
      <dc:date>2018-05-17T06:18:28Z</dc:date>
    </item>
  </channel>
</rss>

