Closed JoryHogeveen closed 2 months ago
Introduction of a New Validation Method
A new method, is_rest_authenticated()
, has been included in the PodsRESTFields
class. This will help in verifying if a user or an application is properly logged in.
Method Replacement for Enhanced Security
The method field_allowed_to_extend
in the PodsRESTFields
class, previously using is_user_logged_in()
, will now utilize is_rest_authenticated()
. This change ensures a more secure and accurate validation process.
Enhancement in Test Cleanup
An update to the PodsRESTFieldsTest
class has been made. After each test, the tearDown
method will now invoke pods_static_cache_clear()
. This helps in maintaining a clean slate for subsequent tests, improving the accuracy and reliability of the results.
Instead of checking if the user is logged in it also checks if the user a basic auth for applications is used.
Description
Fixes #7340
@sc0ttkclark I'm not 100% sure this will be the best method. You could also already set the current WP user so WP core doesn't revalidate using the same method. I'll leave this up to your judgement.
Testing instructions
See #7340
Try the same with this patch and see it now works!
PR checklist