Skip to content
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

Make API v2 return the minimum required information only #74

Closed
giohappy opened this issue Apr 12, 2021 · 2 comments
Closed

Make API v2 return the minimum required information only #74

giohappy opened this issue Apr 12, 2021 · 2 comments

Comments

@giohappy
Copy link
Contributor

We want to enforce the same restrictions to response as implemented for the legacy API.
@marthamareal please go through API v2 and verify if the same logic must be enforced for the new endpoints.

@marthamareal
Copy link
Contributor

From What I see, V2 uses UserSerializer to return user data, and by default, this returns only the following fields
('pk', 'username', 'first_name', 'last_name', 'avatar')
On listing users,

  • Non-authenticated users get an empty list, and can’t view a single user object.
  • For authenticated users, On getting a list of users, admins can view all users () and Non-admins can only see their details.

@giohappy
Copy link
Contributor Author

thx @marthamareal then we're fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants