AnsweredAssumed Answered

Change 'read' permission filter on search results?

Question asked by jrippon on Jun 16, 2008
Latest reply on Jan 30, 2018 by p_bodnar
Our publishing department will use Alfresco to manage documents.  We would like to make some of these documents available to other employees using a custom web interface and web scripts.  We want the employees to have access to only metadata on certain documents (for when publishing wants full control of printing and distribution).  This will allow them to see if they have the latest version on file, find out when the document will be mailed, find the document ID etc. without being able to download an electronic copy.

So I made a custom permission group called "Viewer" that has ReadProperties and ReadChildren permission (but not ReadContent).  In the web interface it works fine, the user can see the document properties but cannot download the document.

However, the documents do not show up in search results.  According to

The rows returned in the result sets from the SearchService are filtered to contain only the nodes to which the user executing the search has read access.

This makes sense as in most cases you wouldn't want a user to determine document contents by searching.  Our situation is unique in that we want to allow users to search and find documents that they have access to in physical form but not in the Alfresco repository.

I looked through the code to find where this filtering happens and didn't see anything obvious, but I am quite new to Alfresco and much of the code is beyond me.

How involved would making a change to filter on ReadProperties (as opposed to ReadContent) be?  Or am I approaching this problem from the wrong direction?  We could for example forget the "Viewer" role and filter result links in our custom web interface.  I just worry about users end-running the filter (through CIFS or the Alfresco UI) to get at documents they shouldn't be able to download.  Another option would be to upload dummy documents with the metadata we want users to see, but this seems inelegant and adds maintenance overhead in addition to reducing search effectiveness.

Any advice is appreciated!