-
Notifications
You must be signed in to change notification settings - Fork 19
Description
We have a form in the front-end that allows the user to use an autocomplete address field to set a location on a map (for a geographical listing directory type of site).
This was achieved exactly as shown here: https://jetformbuilder.com/features/map-field-overview/ using JetFormBuilder, JetEngine, JetSmartFilters and the Map Listings module,
The form works perfect for admin & editors users after last update (see Crocoblock/suggestions#7933).
However, for users with lower permissions (e.g. subscriber, customer, etc), the autocomplete suggests the address, but it doesn't create the marker on the map and throws an error in the console.
After some debugging, I found out that the reason for this is that the rest api endpoint that's used (get-map-location-data), is only enabled for users with 'edit_posts' capabilities, without filters or ways to modify this (See permission_callback method in /plugins/jet-engine/includes/modules/maps-listings/inc/rest/get-map-location-data.php).
As a result the autocomplete address with the map field does not work as expected for those without the right permissions, which makes it not possible to have "normal" users load listings.
I've tried patching said method to validate that the issue is fixed, and it is, but of course that that's not a correct solution.
Could you please have a look into this?
Is a crucial missing piece to be able to use JetEngine/JetSmartFilters/JetFormBuilder as a complete public geo directory system to allow users to load their own listings in the front-end
Thanks!