<?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: Creating Webscripts for giving permission to custom roles on file/folders on repository side in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/creating-webscripts-for-giving-permission-to-custom-roles-on/m-p/82029#M25205</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;You have to create a basic web script first to be sure that it works fine and place under alfresco.&lt;BR /&gt;You can follow the &lt;A href="https://docs.alfresco.com/6.1/concepts/ws-reference.html" target="_blank" rel="noopener nofollow noreferrer"&gt;official documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;If the basic web script works fine, then u can implement your custom code to set permissions using &lt;U&gt;&lt;SPAN class="f7"&gt;PermissionService:&lt;/SPAN&gt;&lt;/U&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;SPAN class="f7"&gt;It's recommended to disable the inheritance behaviour for permissions on the node specified (the folder or the file).&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class="f7"&gt;Set the specific permission on the node specified to the custom roles.&lt;BR /&gt;&lt;U&gt;Note:&lt;/U&gt; It's recommended to give permissions to groups, not users.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;SPAN class="f7"&gt;For more help how to set permissions have a look on &lt;A href="https://docs.alfresco.com/6.0/references/dev-services-permission.html" target="_blank" rel="noopener nofollow noreferrer"&gt;this&lt;/A&gt; and &lt;A href="http://dev.alfresco.com/resource/AlfrescoOne/5.1/PublicAPI/org/alfresco/service/cmr/security/PermissionService.html" target="_blank" rel="noopener nofollow noreferrer"&gt;this&lt;/A&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="f7"&gt;Best regards.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 03 Jun 2020 22:32:43 GMT</pubDate>
    <dc:creator>malekgn</dc:creator>
    <dc:date>2020-06-03T22:32:43Z</dc:date>
    <item>
      <title>Creating Webscripts for giving permission to custom roles on file/folders on repository side</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/creating-webscripts-for-giving-permission-to-custom-roles-on/m-p/82027#M25203</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I want to create webscript such that when it is executed then only permissions on file/folder are given to Custom roles which are created.&lt;/P&gt;&lt;P&gt;I have gone through basic documentation of Webscript as i hadnt work on it before but didnt got much help on how to proceed furthur with my task. If any one could help out how should i move on creating this type of webscipt which on execution gives permission to custom roles on files/folders.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Piyush.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jun 2020 12:25:25 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/creating-webscripts-for-giving-permission-to-custom-roles-on/m-p/82027#M25203</guid>
      <dc:creator>piyush48</dc:creator>
      <dc:date>2020-06-01T12:25:25Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Webscripts for giving permission to custom roles on file/folders on repository side</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/creating-webscripts-for-giving-permission-to-custom-roles-on/m-p/82028#M25204</link>
      <description>&lt;P&gt;If i understood correctly, there is no way you can apply the permission on the webscripts invocation. You can however authenticate the webscript via "user" authentication and write your custom logic to check permissions within the webscript.&lt;/P&gt;
&lt;P&gt;See here for more details on webscript authentication:&amp;nbsp;&lt;A href="https://docs.alfresco.com/6.1/concepts/ws-authenticating.html" target="_blank" rel="noopener nofollow noreferrer"&gt;https://docs.alfresco.com/6.1/concepts/ws-authenticating.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Have a look at this post where you can see a download webscript which checks for permissions (look for isNotAuthorised method call):&amp;nbsp;&lt;A href="https://hub.alfresco.com/t5/alfresco-content-services-blog/downloading-content-from-alfresco-repository-via-custom-download/ba-p/288502" target="_blank" rel="noopener nofollow noreferrer"&gt;https://hub.alfresco.com/t5/alfresco-content-services-blog/downloading-content-from-alfresco-repository-via-custom-download/ba-p/288502&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://javaworld-abhinav.blogspot.com/2017/08/downloading-content-from-alfresco.html" target="_blank" rel="noopener nofollow noreferrer"&gt;http://javaworld-abhinav.blogspot.com/2017/08/downloading-content-from-alfresco.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;You can take a reference and write your webscript to check permissions and perform required operation.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jun 2020 13:32:18 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/creating-webscripts-for-giving-permission-to-custom-roles-on/m-p/82028#M25204</guid>
      <dc:creator>abhinavmishra14</dc:creator>
      <dc:date>2020-06-01T13:32:18Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Webscripts for giving permission to custom roles on file/folders on repository side</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/creating-webscripts-for-giving-permission-to-custom-roles-on/m-p/82029#M25205</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;You have to create a basic web script first to be sure that it works fine and place under alfresco.&lt;BR /&gt;You can follow the &lt;A href="https://docs.alfresco.com/6.1/concepts/ws-reference.html" target="_blank" rel="noopener nofollow noreferrer"&gt;official documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;If the basic web script works fine, then u can implement your custom code to set permissions using &lt;U&gt;&lt;SPAN class="f7"&gt;PermissionService:&lt;/SPAN&gt;&lt;/U&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;SPAN class="f7"&gt;It's recommended to disable the inheritance behaviour for permissions on the node specified (the folder or the file).&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class="f7"&gt;Set the specific permission on the node specified to the custom roles.&lt;BR /&gt;&lt;U&gt;Note:&lt;/U&gt; It's recommended to give permissions to groups, not users.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;SPAN class="f7"&gt;For more help how to set permissions have a look on &lt;A href="https://docs.alfresco.com/6.0/references/dev-services-permission.html" target="_blank" rel="noopener nofollow noreferrer"&gt;this&lt;/A&gt; and &lt;A href="http://dev.alfresco.com/resource/AlfrescoOne/5.1/PublicAPI/org/alfresco/service/cmr/security/PermissionService.html" target="_blank" rel="noopener nofollow noreferrer"&gt;this&lt;/A&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="f7"&gt;Best regards.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jun 2020 22:32:43 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/creating-webscripts-for-giving-permission-to-custom-roles-on/m-p/82029#M25205</guid>
      <dc:creator>malekgn</dc:creator>
      <dc:date>2020-06-03T22:32:43Z</dc:date>
    </item>
  </channel>
</rss>

