Skip to content
This repository was archived by the owner on Sep 24, 2018. It is now read-only.

Conversation

@joehoyle
Copy link
Member

Using the new WordPress WP_User_Query has_published_posts flag we can show only public users that would otherwise be exposed via authors on public posts on the /wp/v2/users endpoint.

See #839

joehoyle added 2 commits July 12, 2015 19:15
It sometimes happens that there are more public users than this test
case creates it's self, so we can't make it super deterministic.
@joehoyle joehoyle self-assigned this Jul 12, 2015
@joehoyle joehoyle added this to the 2.0 Beta 4 milestone Jul 12, 2015
@joehoyle
Copy link
Member Author

This is failing because we run the unit tests against the latest stable release of WordPress, not trunk - an this PR requires the recent patch that was committed to core.

@rmccue rmccue assigned rmccue and unassigned joehoyle Jul 22, 2015
@rmccue
Copy link
Member

rmccue commented Jul 22, 2015

Fixing the tests up here.

@rmccue
Copy link
Member

rmccue commented Jul 22, 2015

@joehoyle Testing fixed up here. You happy with the PR and ready to merge it?

@rmccue rmccue assigned joehoyle and unassigned rmccue Jul 23, 2015
@joehoyle
Copy link
Member Author

@rmccue thanks for that, yup I'm ready for a merge

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we only include posts marked as show_in_rest? Internally, WP grabs types with public => true here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The thought was this would only reflect users who were already exposed via the RSS feeds, which could be any public post type, though I guess that's not a guarantee either. show_in_rest might be safer, or literally post_type=post

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, good point on that. I'm fine with all then. :)

rmccue added a commit that referenced this pull request Jul 26, 2015
Remove permissions checks from get users so we can show public users
@rmccue rmccue merged commit 3332d73 into develop Jul 26, 2015
@rmccue rmccue deleted the public-user-users branch July 26, 2015 19:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants