-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Most Used Terms: Avoid 403 error for non-administrators #33569
Conversation
@@ -33,7 +34,7 @@ export default function MostUsedTerms( { onSelect, taxonomy } ) { | |||
); | |||
return { | |||
_terms: mostUsedTerms, | |||
showTerms: mostUsedTerms?.length >= MAX_MOST_USED_TERMS, | |||
showTerms: mostUsedTerms?.length === MAX_MOST_USED_TERMS, |
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.
Updated check as suggested here - #33457 (comment)
Size Change: +7 B (0%) Total Size: 1.07 MB
ℹ️ View Unchanged
|
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.
Looks good - thanks George!
Thanks for the review, @ntsekouras. |
Should this be included in 5.8.1 along with #33457? Adding the label for tracking, but please remove if this is not the case. |
@Mamaduka Thanks! Let's leave this one out. |
Description
The editor will trigger a 403 error when trying to fetch the most used terms for non-administrator users. This PR fixes this by setting the
context
param toview.
How has this been tested?
Types of changes
Bugfix
Checklist:
*.native.js
files for terms that need renaming or removal).