cancel
Showing results for 
Search instead for 
Did you mean: 

Query folders granted to person

skushnerenko
Confirmed Champ
Confirmed Champ

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.

1 ACCEPTED ANSWER

afaust
Legendary Innovator
Legendary Innovator

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.

View answer in original post

3 REPLIES 3

afaust
Legendary Innovator
Legendary Innovator

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).

skushnerenko
Confirmed Champ
Confirmed Champ

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/cmSmiley FrustratedED_ROOT//*" AND TYPE:"cm:folder" AND -TYPE:"cm:systemfolder" AND @cm\:READER:"DEMO" 

afaust
Legendary Innovator
Legendary Innovator

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.