Fix block crash when Apple Maps credentials are missing.#233
Conversation
|
@elvismdev thanks for the PR! Could you please fill out the PR template with description, changelog, and credits information so that we can properly review and merge this? |
|
Thanks for the PR, @elvismdev While testing the code, it appears that using the settings endpoint prevents contributors and other low privileged users from using the maps block when credentials are saved.
I think the check needs to be against the The endpoint is registered in the file |
|
@faisal-alvi perhaps this is something you can help update and send back to Peter for review during your OSS week? |
|
I’ve updated the block’s authentication logic as suggested. Instead of checking the settings endpoint, the block now checks the
This should resolve the issue where contributors and other low-privileged users were unable to use the block when credentials were saved. Please let me know if you have any feedback or if further adjustments are needed! |
|
@faisal-alvi I'm seeing a bug once credentials are saved in that the authentication screen is shown to admins and the error message to contributors rather than the map input. At this point of the execution Line 235 in 8b7821e In the console, I am seeing an error when I run the "confirm mapkit credentials button" but that may be related to the issue described above. |
|
@peterwilsoncc Thanks for the feedback! The issue was caused by an unnecessary check in the authentication logic; specifically, I was checking for I updated the logic to simply check for a valid response (i.e., Let me know if you have any further feedback or spot anything else! |
peterwilsoncc
left a comment
There was a problem hiding this comment.
Thanks @faisal-alvi, this is now working as expected.





Description of the Change
This PR fixes the issue where the Apple Maps block would crash when no credentials were configured instead of showing the credentials form.
Key changes:
Closes #232
How to test the Change
Changelog Entry
Fixed - Block crash when no Apple Maps credentials are configured, now properly shows credentials form
Credits
Props @elvismdev
Checklist: