Query folders granted to person

cancel
Showing results for 
Search instead for 
Did you mean: 
skushnerenko
Active Member II

Query folders granted to person

Jump to solution

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 Solution

Accepted Solutions
afaust
Master

Re: Query folders granted to person

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

View solution in original post

3 Replies
afaust
Master

Re: Query folders granted to person

Jump to solution

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
Active Member II

Re: Query folders granted to person

Jump to solution

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
Master

Re: Query folders granted to person

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