cancel
Showing results for 
Search instead for 
Did you mean: 

Run search as a different user?

chkk
Champ in-the-making
Champ in-the-making
Is it possible to run search (normal and/or advanced) and the display of the search results as a different user?

The planned use case is that users should be able to search for all documents (possibly with admin rights or a dedicated search user) and only limit access to the individual documents based on the logged in user's rights to allow users to request document access if necessary.

This is a site where the availability of the documents is not yet confidential information, just the attachments and the full metadata details.

Regards,
Chris
1 REPLY 1

afaust
Legendary Innovator
Legendary Innovator
This is something that is not possible by configuration alone. Alfresco has no end-user feature to search "as another user". But it has code-level features to execute sections of code with a different user identity (AuthenticationUtils.runAs(RunAsWork, String)), and this would allow you to develop a custom search backend that executes the search as a different user and then filters the result again based on the actual user. Be aware though that this will result in a significant performance impact due to multiple permission checking and break functionality such as pagination (due to post-filtering), that you would need to compensate for or live with.

Regards
Axel