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

Attributes param in config being ignored for some models #150

Open
russjohnson opened this issue Aug 19, 2016 · 2 comments
Open

Attributes param in config being ignored for some models #150

russjohnson opened this issue Aug 19, 2016 · 2 comments

Comments

@russjohnson
Copy link

russjohnson commented Aug 19, 2016

I have 3 models configured using the attributes option in the config to whitelist several fields. It seems to work fine for one of the models, but the other 2 just return all fields. Im pretty sure I have it configured right, its just a simple setup. The users model is the only one that honors the whitelisting, members and clients just return all fields.

{
  "loopback-component-explorer": {
    "mountPath": "/explorer"
  },
  "loopback-component-jsonapi": {
    "restApiRoot": "/api",
    "handleErrors": true,
    "attributes": {
      "users": ["firstName", "lastName", "email", "rememberToken", "role"],
      "members": ["companyName", "badEmail"],
      "clients": ["active", "signupName", "signupText"]
    }
  }
}
@digitalsadhu
Copy link
Owner

Thanks for reporting!

Config looks good. How would you feel about contributing a failing test? If so you should be able to copy one of the other tests setups.

In any case I will do my best to get to this issue this week.

@russjohnson
Copy link
Author

I've only been at Node for about 2 weeks and loopback for a day or so but I will see what I can put together later today.

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

No branches or pull requests

2 participants