I need to query a full list of folders in folder tree inside a repository, granted to certain person directly (not through inheritence or group membership).
Or at least a list of files inside such folders.
The purpose is to give access for one person to all folders in repository accessible to another person. I am going to do this by javascript, the problem is only to select such a list of folders.
Solved! Go to Solution.
READER is a meta-field and not associated with any namespace. The query should be something like
PATH:"/app:company_home/cm:SED_ROOT//*" AND TYPE:"cm:folder" AND -TYPE:"cm:systemfolder" AND READER:"<userName>"
Also note: The @ in FTS queries is absolutely unnecessary - it is only a legacy remnant of the Lucene query syntax.
There is no functionality in Alfresco to query folders by directly assigned permissions. Technically, since SOLR indexes ACLs, you could query using the READER meta field which will be only set to the user name of a specific user if that user has an explicit permission on the node or via inheritance (you'd need to filter out the inheritance after the query). But be aware that you will only get a result based on the eventually consistent index and some structures may not be indexed (i.e. via cm:indexControl).
It should have solved my task, but I am not sure with query syntax.
I have tried all possible variants, for example
PATH:"/app:company_home/cmED_ROOT//*" AND TYPE:"cm:folder" AND -TYPE:"cm:systemfolder" AND @cm\:READER:"DEMO"
READER is a meta-field and not associated with any namespace. The query should be something like
PATH:"/app:company_home/cm:SED_ROOT//*" AND TYPE:"cm:folder" AND -TYPE:"cm:systemfolder" AND READER:"<userName>"
Also note: The @ in FTS queries is absolutely unnecessary - it is only a legacy remnant of the Lucene query syntax.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.