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

Use show_in_rest to determine "public" post types to check - #2384

Merged
danielbachhuber merged 1 commit into
developfrom
show-in-rest-permissions-check
Jun 26, 2016
Merged

Use show_in_rest to determine "public" post types to check#2384
danielbachhuber merged 1 commit into
developfrom
show-in-rest-permissions-check

Conversation

@danielbachhuber

Copy link
Copy Markdown
Member

Whether or not a user should appear in the REST API should be determined by whether they have any posts that appear in the API, not public posts generally.

From 71800a9 and #2155

Whether or not a user should appear in the REST API should be determined by whether they have any posts that appear in the API, not public posts generally. From 71800a9
@danielbachhuber

Copy link
Copy Markdown
Member Author

@joehoyle Why did you change this originally?

@BE-Webdesign

Copy link
Copy Markdown
Member

Would this mean that someone with a published public post of a type with show_in_rest => false does not pop up? Meaning other people can see it but rest api can't?

@danielbachhuber

Copy link
Copy Markdown
Member Author

Would this mean that someone with a published public post of a type with show_in_rest => false does not pop up? Meaning other people can see it but rest api can't?

More or less, yes.

@joehoyle

Copy link
Copy Markdown
Member

@danielbachhuber I think this was intentional (though maybe incorrect) because I was trying to not disclose any more users than are already exposed via the public site (author of published posts).

@rmccue

rmccue commented Mar 18, 2016

Copy link
Copy Markdown
Member

Yeah, I think technically you could have non-public posts that have show_in_rest, and vice-versa. Maybe we need both?

@danielbachhuber

Copy link
Copy Markdown
Member Author

Yeah, I think technically you could have non-public posts that have show_in_rest, and vice-versa.

Yep.

Maybe we need both?

Personally, I don't think so. I think we should use show_in_rest across the board as the indicator of whether something should be exposed in the API.

@BE-Webdesign

Copy link
Copy Markdown
Member

The more I thought about this, the more I agree with the idea of only show_in_rest => true. This is the REST API so if something is set to not show up in it, show_in_rest => false, why should it, just because it is marked public etc? Same for the reverse case as well and non-public posts would just be handled as non-public posts as a separate concern.

@danielbachhuber danielbachhuber added this to the 2.0 Beta 14 milestone Jun 26, 2016
@danielbachhuber
danielbachhuber merged commit da9da14 into develop Jun 26, 2016
@danielbachhuber
danielbachhuber deleted the show-in-rest-permissions-check branch June 26, 2016 10:23
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.

4 participants