<?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 Setting Permissions with API starting from Alfresco Search API in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/setting-permissions-with-api-starting-from-alfresco-search-api/m-p/487186#M39881</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Situation:&amp;nbsp;&lt;BR /&gt;We have a software supplier that is a Contributor to a site, creating a folder structure and putting files.&lt;BR /&gt;The user is software_supplier1&lt;/P&gt;&lt;P&gt;Example of the folder structure&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;- Folder 1
 - 1_Extern
 - 2_Intern

- Folder 2
 - 1_Extern

- Folder 3
 - 1_Extern
 - 2_Intern
 - 3_Sensitive&lt;/LI-CODE&gt;&lt;P&gt;There there is another software supplier that only has ALLOWED access to all 1_Extern folder. That part works already. This is done with a separate user for separating users for different tasks.&amp;nbsp;&lt;BR /&gt;Example user is modifying_user&lt;BR /&gt;&lt;BR /&gt;ButI thought that if I query that the modifier is&amp;nbsp;software_supplier1 I'm getting only the nodeId's that needs to be checked for permissions and be updated. This works on the the first run. Then the folder&amp;nbsp; modified user is modifying_user.&lt;/P&gt;&lt;P&gt;But when there's a document put in 1_Extern the parent folder is set back to&amp;nbsp;software_supplier1 instead of modifying_user. Thus my query for filtering out the nodeId's for the folders that needs to be updated doesn't work anymore.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{
   "query":{
      "query":"PATH:'//app:company_home/st:sites/cm:sitename/cm:documentLibrary//*' AND TYPE:'cm:folder' AND NOT cm:modifier:'modifying_user'"
   },
   "paging":{
      "maxItems":50
   },
   "include":[
      "permissions",
      "path"
   ]
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are there any hints/tips to get this working or for a better workflow?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 19 Feb 2025 10:18:31 GMT</pubDate>
    <dc:creator>DM8800</dc:creator>
    <dc:date>2025-02-19T10:18:31Z</dc:date>
    <item>
      <title>Setting Permissions with API starting from Alfresco Search API</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/setting-permissions-with-api-starting-from-alfresco-search-api/m-p/487186#M39881</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Situation:&amp;nbsp;&lt;BR /&gt;We have a software supplier that is a Contributor to a site, creating a folder structure and putting files.&lt;BR /&gt;The user is software_supplier1&lt;/P&gt;&lt;P&gt;Example of the folder structure&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;- Folder 1
 - 1_Extern
 - 2_Intern

- Folder 2
 - 1_Extern

- Folder 3
 - 1_Extern
 - 2_Intern
 - 3_Sensitive&lt;/LI-CODE&gt;&lt;P&gt;There there is another software supplier that only has ALLOWED access to all 1_Extern folder. That part works already. This is done with a separate user for separating users for different tasks.&amp;nbsp;&lt;BR /&gt;Example user is modifying_user&lt;BR /&gt;&lt;BR /&gt;ButI thought that if I query that the modifier is&amp;nbsp;software_supplier1 I'm getting only the nodeId's that needs to be checked for permissions and be updated. This works on the the first run. Then the folder&amp;nbsp; modified user is modifying_user.&lt;/P&gt;&lt;P&gt;But when there's a document put in 1_Extern the parent folder is set back to&amp;nbsp;software_supplier1 instead of modifying_user. Thus my query for filtering out the nodeId's for the folders that needs to be updated doesn't work anymore.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{
   "query":{
      "query":"PATH:'//app:company_home/st:sites/cm:sitename/cm:documentLibrary//*' AND TYPE:'cm:folder' AND NOT cm:modifier:'modifying_user'"
   },
   "paging":{
      "maxItems":50
   },
   "include":[
      "permissions",
      "path"
   ]
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are there any hints/tips to get this working or for a better workflow?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2025 10:18:31 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/setting-permissions-with-api-starting-from-alfresco-search-api/m-p/487186#M39881</guid>
      <dc:creator>DM8800</dc:creator>
      <dc:date>2025-02-19T10:18:31Z</dc:date>
    </item>
    <item>
      <title>Re: Setting Permissions with API starting from Alfresco Search API</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/setting-permissions-with-api-starting-from-alfresco-search-api/m-p/487257#M39892</link>
      <description>&lt;P&gt;My 2 cents: create an Aspect with one property and add it to folder you already worked on.&lt;/P&gt;&lt;P&gt;For example, your aspect is "acme:my-aspect" with property "acme:my-property", you can modify your query with:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;"query":"PATH:'//app:company_home/st:sites/cm:sitename/cm:documentLibrary//*' AND TYPE:'cm:folder' AND ISUNSET:'acme:my-property'"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Or, probably, you can search also for folder without the aspect with:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;"query":"PATH:'//app:company_home/st:sites/cm:sitename/cm:documentLibrary//*' AND TYPE:'cm:folder' AND (NOT ASPECT:'acme:my-aspect')"&lt;/LI-CODE&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Feb 2025 08:00:34 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/setting-permissions-with-api-starting-from-alfresco-search-api/m-p/487257#M39892</guid>
      <dc:creator>LeoMattioli</dc:creator>
      <dc:date>2025-02-21T08:00:34Z</dc:date>
    </item>
  </channel>
</rss>

