Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
- Home
- General
- Feature Requests
- RE: Allow document form fields to be viewed by guest user in search result
RE: Allow document form fields to be viewed by guest user in search result
I am trying to create custom template for search result and since I need to display the selective structured web content fields on the front-end using the template, I have enable the configuration under search result portlet configuration as below.
I am able to get the DocumentFormFieldDisplayContexts for the logged in user but for the guest it is null leading to no result for guest users.
I try to dig out if there is any configuration or permission to achieve the desired result but no success. Lately, I found that it is intended beahvior from Liferay, only admin user can see the document form fields.
Expected Result:
The guest should see the document form fields values same as of admin.
Possible Solution:
There should be configuration based constraint to see the document form fields for the guest user or the search result widget should be like collection display where we can map fragments to the document fields. I am wondering with use case of creating custom search result templates if we can not control how to display and what to display.
Hello Manukumar,
The restriction was added intentionally as the full index document can include several metadata fields that may represent sensitive information about the underlying platform and the given deployment. This is the reason why the document form display is limited to Instance Administrators.
If I undertand it properly, you are looking for a way to use the Search Results widget similar to a Collection Display Fragment, right?
Could you share more about your use-case, what fields you would be interested in to map, or if you have considered to switch to Collections and Collection Filters from Search widgets etc.
Thanks,
Tibor
Hi Tibor,
I am only trying to customize the frontend of the search result, where, I am using search result template to display the fields of structured web content but I am not able to do so because the document form fields are restricted to admin user only. I tried using the blueprints as well, where, I can control what fields to be displayed but even then those fields are part of document form fields.
The custom search result template is not giving me any freedom to customize the result display. I would recommend to keep structured fields out of document form fields as they are not sensitive information either or these fields should be visible to guest user (permission based) if we provide what fields to be displayed in search result.
NOTE: I tried using the collection display and filters as well but there are other limitation as the filter parameter name can not be customized (currently it is filter_category_<fragmentEntryLinkId>).
Hi Manukumar,
Thanks for the additional context. I've linked this request to https://liferay.atlassian.net/browse/LPD-4231 in our backlog for future re-evaulation.
Regards,
Tibor
Powered by Liferay™