Fórumok

Custom Search Portlet to dispaly data based on view permission

thumbnail
Ashish Ranjan, módosítva 9 év-val korábban

Custom Search Portlet to dispaly data based on view permission

Junior Member Bejegyzések: 57 Csatlakozás dátuma: 2009.12.11. Legújabb bejegyzések
How to create custom portlet like liferay search portlet to display data based on view permission..
Suppose user1 create a blogs i.e BLOG1 that having the owner view permission in that case user1 and Admin of the portal can see that blogs after search for other user BLOG1 will not display after search.
I have to implements same scenario with other custom entity to display data .
I am using Liferay 6.1..
It would be great help if someone please provide the sample portlet..

Thanks in Advance.

Regards,
Ashish Ranjan
thumbnail
Ashish Ranjan, módosítva 9 év-val korábban

RE: Custom Search Portlet to dispaly data based on view permission

Junior Member Bejegyzések: 57 Csatlakozás dátuma: 2009.12.11. Legújabb bejegyzések
Anyone please provide some idea to resolve the problem..

Regards,
Ashish Ranjan
thumbnail
Ben VonDerHaar, módosítva 9 év-val korábban

RE: Custom Search Portlet to dispaly data based on view permission

Junior Member Bejegyzések: 39 Csatlakozás dátuma: 2013.06.11. Legújabb bejegyzések
Ashish,

As this is a highly customized solution, there will not be an existing portlet that you can simply download and use - this is something you'll need to build yourself. Here are some articles that may help you get started:
https://www.liferay.com/community/wiki/-/wiki/Main/Pluggable+Enterprise+Search+with+Solr
https://www.liferay.com/documentation/liferay-portal/6.1/development/-/ai/security-and-permissio-4

Solr is a super fast search engine that will increase your performance when doing queries against a well-designed index. My currently employer has successfully used this technology to produce search results over 100000+ entities in sub 0.5 seconds. The security and permissions framework is doing to completely govern the results, so it would be best to become extremely familiar with that as well.

Best,
-Ben VonDerHaar
thumbnail
Ashish Ranjan, módosítva 9 év-val korábban

RE: Custom Search Portlet to dispaly data based on view permission

Junior Member Bejegyzések: 57 Csatlakozás dátuma: 2009.12.11. Legújabb bejegyzések
Thanks Ben,

I am using solr search for search that i have configured with liferay.As i have mention i have to implents view based permission on search text.

In current project lots of view cateria is there that is decided by role view permission.

I am looking for sample code throught that i can refer and achive solution..

Regards,
Ashish Ranjan
thumbnail
Ashish Ranjan, módosítva 9 év-val korábban

RE: Custom Search Portlet to dispaly data based on view permission

Junior Member Bejegyzések: 57 Csatlakozás dátuma: 2009.12.11. Legújabb bejegyzések
Hi All,

Please anyone respond ???

Regards,
Ashish Ranjan
thumbnail
Andew Jardine, módosítva 9 év-val korábban

RE: Custom Search Portlet to dispaly data based on view permission

Liferay Legend Bejegyzések: 2416 Csatlakozás dátuma: 2010.12.22. Legújabb bejegyzések
I think the Search portlet does this already. If you want to restrict the results to just BLOG posts, then under the configuration for the search portlet (instance), got to advanced, and then modify the asset entry section of the JSON and remove all the model references except for the Blog model. The items listed here will be applied as a filter on the query whereby the entryClassName field on the search index record must match one of the provided values.

The main point though is that I am fairly certain the federated search portlet already restricts what you can and cannot see based on your permissions. If it does not, then perhaps create one or more jsp overrides for the /html/portlet/search/ portlet and modify the Hits results accordingly.