Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
First Timer
Permission based search not working for Webcontent
July 2, 2012 1:07 PM
Answer

First Timer

Rank: New Member

Posts: 5

Join Date: August 24, 2011

Recent Posts

Hi,

We are using Liferay 6.1CE in our project and what I found is that, search results are not refined based on the user permissions for webcontent.
I some how managed to restrict the search results by overriding hasPermission and enabling FilterSearch in JournalIndexer.
But the problem is , I couldn't dwindle down the frequency count for categories and assets (Facets)..

Can any of you please let me know what class I need to customize to get the expected behavior for search based on user permission .

This is quite urgent to me, any help is much appreciated.
Attachment

Attachments: permission based search.PNG (14.7k)
Yogesh Agrawal
RE: Permission based search not working for Webcontent
July 2, 2012 11:33 PM
Answer

Yogesh Agrawal

Rank: Junior Member

Posts: 33

Join Date: May 17, 2010

Recent Posts

Document and images are filtered based on permissions.
You can look at DLIndexer.java
 1@Override
 2    public boolean hasPermission(
 3            PermissionChecker permissionChecker, long entryClassPK,
 4            String actionId)
 5        throws Exception {
 6
 7        return DLFileEntryPermission.contains(
 8            permissionChecker, entryClassPK, ActionKeys.VIEW);
 9    }


same you have to achieve in JournalIndexer