Search files via Lucene & filter results by User Permission

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-29-2010 08:46 PM
Hi,
I'm working on the search capability using Alfresco's Lucene search API through web services, mainly searching files using metadata (aspects defined in a custom dynamic model). Is it possible to restrict your query/search results with the permissions of the user to the file/space?
We don't want the users seeing the files they don't have access/permission to in the Lucene search results. Hope someone could point me on the approach. Thanks.
Regards
I'm working on the search capability using Alfresco's Lucene search API through web services, mainly searching files using metadata (aspects defined in a custom dynamic model). Is it possible to restrict your query/search results with the permissions of the user to the file/space?
We don't want the users seeing the files they don't have access/permission to in the Lucene search results. Hope someone could point me on the approach. Thanks.
Regards
Labels:
- Labels:
-
Archive
5 REPLIES 5
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-30-2010 02:29 AM
This is the default behaviour, search is evaluated using the permissions for the logged in user.
http://wiki.alfresco.com/wiki/Search
http://wiki.alfresco.com/wiki/Search

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-30-2010 05:09 AM
This is the default behaviour, search is evaluated using the permissions for the logged in user.
http://wiki.alfresco.com/wiki/Search
Hi Loftux,
What if I am using a generic account to authenticate? Is there a way to leverage this kind of behaviour? Assuming I have a web application which uses the Alfresco web services API (Lucene Search) in the backend but the account used to authenticate to Alfresco is a generic account. Thanks.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-30-2010 05:32 AM
There is runAs functionality, see http://dev.alfresco.com/resource/docs/java/repository/org/alfresco/repo/security/authentication/Auth...
Haven't used it myself, try searching the forums for more detailed info http://www.google.com/search?q=site:forums.alfresco.com+runas+java
Haven't used it myself, try searching the forums for more detailed info http://www.google.com/search?q=site:forums.alfresco.com+runas+java

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-30-2010 08:08 AM
There is runAs functionality, see http://dev.alfresco.com/resource/docs/java/repository/org/alfresco/repo/security/authentication/Auth...
Haven't used it myself, try searching the forums for more detailed info http://www.google.com/search?q=site:forums.alfresco.com+runas+java
Is it possible to run this class with the web services API? Thanks in advance!

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-30-2010 08:09 AM
There is runAs functionality, see http://dev.alfresco.com/resource/docs/java/repository/org/alfresco/repo/security/authentication/Auth...
Haven't used it myself, try searching the forums for more detailed info http://www.google.com/search?q=site:forums.alfresco.com+runas+java
Is it possible to run this org.alfresco.repo.security.AuthenticationUtil class with the web services API? Thanks in advance!
