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

vulcan-users - permissions - filter out array based fields #2056

Merged
merged 1 commit into from
Sep 11, 2018
Merged

vulcan-users - permissions - filter out array based fields #2056

merged 1 commit into from
Sep 11, 2018

Conversation

vincro
Copy link
Contributor

@vincro vincro commented Sep 7, 2018

When using the resolver for the resolveAs examples from the documentation:

http://docs.vulcanjs.org/field-resolvers.html

I found that the Users.getViewableFields helper was return array based field names, which obviously are not compatible with the selector/options objects passed through to collection.findOne.

I did a search to see where the function is called in the DEVEL codebase and see that it is used only once. That being said, others may well be using it and require the array field names, so perhaps might help to create a wrapper function that strips them out to use instead, but for now I figured I would submit this for you.

@SachaG
Copy link
Contributor

SachaG commented Sep 11, 2018

Right, those array fields are not supposed to have canCreate or canUpdate properties but I suppose if they do have them it's good to filter them out.

@SachaG SachaG merged commit 5faafa5 into VulcanJS:devel Sep 11, 2018
@SachaG
Copy link
Contributor

SachaG commented Sep 11, 2018

Sorry in this case it should be canRead. But the point is the same :)

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

Successfully merging this pull request may close these issues.

2 participants