04-20-2020 11:19 AM
Hello,
how can i use API
GET /alfresco/api/-default-/public/alfresco/versions/1/nodes/{nodeId}/children
to show only my files?
An what if i don't have permission to show folder in sites/Test/documentLibrary/Documents, but someone moved there files where i am as Collaborator, how can i show files from this folder, without managing permissions on the folder?
Thanks
04-20-2020 12:26 PM
These requirements are where you would switch from the regular "children" navigation / listing operation and use the "search" API instead. This would allow you to combine a condition for "my files", which in AFTS query expression would look like this:
(=cm:creator:"myUserName" AND NOT PROPERTIES:"{http://www.alfresco.org/model/content/1.0}owner") OR =cm:owner:"myUserName"
..with the condition of "in folder X", which in AFTS query expression would be:
PARENT:"folderNodeRef"
If you wanted to find files in folders where you don't have access to the folder itself, but the files therein, then "search" is also about your only chance to find those.
04-20-2020 12:26 PM
These requirements are where you would switch from the regular "children" navigation / listing operation and use the "search" API instead. This would allow you to combine a condition for "my files", which in AFTS query expression would look like this:
(=cm:creator:"myUserName" AND NOT PROPERTIES:"{http://www.alfresco.org/model/content/1.0}owner") OR =cm:owner:"myUserName"
..with the condition of "in folder X", which in AFTS query expression would be:
PARENT:"folderNodeRef"
If you wanted to find files in folders where you don't have access to the folder itself, but the files therein, then "search" is also about your only chance to find those.
Explore our Alfresco products with the links below. Use labels to filter content by product module.