Skip to content

DF_Model - `get_published_where`

Josh Smith requested to merge feature/get_published_related_records_via_api into master

Related records fetched through get_published_with are now filtered by their own published status.

What I did

  • Implemented filtering of related records fetched through get_published_with by their own published status.
  • Removed whitespace from DF_REST_Controller.php.

Implications

This may have undesired effects on existing API implementations, where non-published records were intentionally being fetched, that will now be filtered out. This should be made part of the upgrade docs for 0.19.0.

Setup

None.

How to test

  • Setup an API endpoint, fetching records from a DF_model implementation.
  • Perform a request, fetching related records using the with methods.
  • Ensure the published value on the related records model is respected.

Task: https://preview.gotasman.com/dashboard/tasks/you-should-only-be-able-to-delete-your-own-notes-49028

Merge request reports