Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Sep 24, 2018. It is now read-only.

Use proper status code when failing to get comments of private post - #1867

#1867
Merged
danielbachhuber merged 2 commits into
developWP-API/WP-API:developfrom
fix-comment-get-private-postWP-API/WP-API:fix-comment-get-private-postCopy head branch name to clipboard
Dec 15, 2015
Merged

Use proper status code when failing to get comments of private post#1867
danielbachhuber merged 2 commits into
developWP-API/WP-API:developfrom
fix-comment-get-private-postWP-API/WP-API:fix-comment-get-private-postCopy head branch name to clipboard

Conversation

@danielbachhuber

Copy link
Copy Markdown
Member

No description provided.

@danielbachhuber danielbachhuber added this to the 2.0 Beta 10 milestone Dec 15, 2015
@danielbachhuber

Copy link
Copy Markdown
Member Author

@WP-API/amigos #reviewmerge

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@danielbachhuber Would a 403 status code be more accurate here? Even if a user was logged-in they may not have permission to read private posts.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

rest_authorization_required_code() returns 401 when the user is logged out, and 403 when the user is logged in?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

401 is basically "if you are not logged in, login and retry, then we'll tell you if you can access this" so I think we are good.

danielbachhuber added a commit that referenced this pull request Dec 15, 2015
Use proper status code when failing to get comments of private post
@danielbachhuber
danielbachhuber merged commit 9cfa514 into develop Dec 15, 2015
@danielbachhuber
danielbachhuber deleted the fix-comment-get-private-post branch December 15, 2015 17:33
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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.