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

Conversation

@rachelbaker
Copy link
Member

Changed the following fields to only display in the view or edit contexts:
- first_name
- last_name
- slug
- nickname

Includes test coverage.

The embed context now only includes the following response fields:

avatar_url
id
link
name
url
description

Changed the following fields to only display in the view or edit contexts:
- first_name
- last_name
- slug
- url
- description
- nickname
@rachelbaker rachelbaker added this to the 2.0 Beta 2 milestone May 19, 2015
@rachelbaker
Copy link
Member Author

Fixes #417

@WP-API/amigos #reviewmerge

@danielbachhuber
Copy link
Member

Why are you removing url and description ?

@rachelbaker
Copy link
Member Author

Why are you removing url and description ?

@danielbachhuber because those details aren't always publically available. Some themes expose them, but we shouldn't assume all sites want that data public.

@danielbachhuber
Copy link
Member

Some themes expose them, but we shouldn't assume all sites want that data public.

I thought we decided in NYC that we'd be exposing the data?

@rachelbaker
Copy link
Member Author

@danielbachhuber You are right, confirmed with the logic laid out in #417 and corrected in dbfe9e7

Copy link
Member

Choose a reason for hiding this comment

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

Isn't slug exposed in the URL?

Copy link
Member

Choose a reason for hiding this comment

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

And by URL I mean link

Copy link
Member Author

Choose a reason for hiding this comment

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

@danielbachhuber It is exposed in the author url. slug also defaults to the user_login so I don't see a reason to expose it in the embedded response.

Copy link
Member

Choose a reason for hiding this comment

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

slug also defaults to the user_login so I don't see a reason to expose it in the embedded response.

Why not? Most other resources all have slug: Post, Term

Copy link
Member Author

Choose a reason for hiding this comment

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

@danielbachhuber Is there a use case for having the Users slug without authentication? Keeping in mind that get_author_posts_url() is filterable to not use user_nicename (or slug)

Copy link
Member

Choose a reason for hiding this comment

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

Is there a use case for having the Users slug without authentication?

Consistency.

Copy link
Member Author

Choose a reason for hiding this comment

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

I feel very strongly that slug is a User field I would not expect to be available in the embed context. The field is available in the view and edit context.

Is there a reason besides consistency?

Copy link
Member

Choose a reason for hiding this comment

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

Is there a reason besides consistency?

Not at the top of my head, but I'm sleep deprived.

We can just see if it comes up again.

danielbachhuber pushed a commit that referenced this pull request May 20, 2015
Limit the Users response fields in the embed context
@danielbachhuber danielbachhuber merged commit 67a866a into develop May 20, 2015
@danielbachhuber danielbachhuber deleted the fix-417 branch May 20, 2015 23:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants