-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Core Data: Always try to resolve entity permissions #71532
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Core Data: Always try to resolve entity permissions #71532
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Size Change: -1 B (0%) Total Size: 1.93 MB
ℹ️ View Unchanged
|
| // When requesting all fields, the list of results can be used to resolve | ||
| // the `getEntityRecord` selector in addition to `getEntityRecords`. | ||
| // See https://github.com/WordPress/gutenberg/pull/26575 | ||
| // Todo https://github.com/WordPress/gutenberg/issues/26629 | ||
| if ( ! query?._fields && ! query.context ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm working on #26629 and hope to remove these conditions entirely.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh nice, that's very related to #70789
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's the first part, which should solve the additional requests problem - #71541.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's the follow-up for this particular case - #71575.
|
@priethor, should we merge this? |
|
I'm going to merge this. PR just moves conditions around. |
Co-authored-by: Mamaduka <[email protected]> Co-authored-by: priethor <[email protected]>
priethor
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Late reply but yes 🚀
Co-authored-by: Mamaduka <[email protected]> Co-authored-by: priethor <[email protected]>
What?
This is a follow-up to #70738.
PR removes
queryargument conditions for entity permission resolutions. The data used for getting user permissions isn't contextual; it either exists or does not.It's better to review with the whitespace hidden.
Why?
Should improve performance for collection queries when the
contextquery argument is specified.Testing Instructions
wp-admin/site-editor.php?p=%2Fpage&layout=table.OPTIONSrequests for the/pagesendpoint.Test patch
Testing Instructions for Keyboard
Same.
Screenshots or screencast