-
Notifications
You must be signed in to change notification settings - Fork 116
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
Limit Collection For User #12
Comments
Right now, the only way to limit or alter what's returned is to completely override the collection endpoint: Restivus.addCollection Meteor.users
endpoints:
get:
action: ->
# Do all your work here as you would in a regular (non-collection) endpoint
getAll:
action: ->
# Do all your work here as you would in a regular (non-collection) endpoint If you're going to go through all the work of passing me a filtered cursor, as you suggested, all you would need to do is to just call One thing that I intend to do, regardless, is to add hooks to all the endpoints to allow you to modify the response data immediately before it's returned. That would certainly be more convenient than having to manually override the I'm in the process of adding automated testing, which is long overdue. Once I have a decent test suite setup I'll make this feature my top priority. I expect the initial test suite to be complete this weekend, so I should be able to get this feature published by next weekend. At the absolute least I will add the |
This. A |
You're right, that would be perfect. It's funny, I was just reading the Meteor Docs on Mongo Collections in an unrelated matter, and when I came across the I'll update this once I decide how to add it to the API, in case you want to give some feedback on that. It may just be an extra option on the |
@mvryan @kahmali Hello!
doesn't work for me |
This works for me. But I'm not quite sure if it is the correct way.
|
Hi I was wondering if there is some way I can limit what elements of a collection each user can see like the built in Meteor.publish function allows?
Can I pass a cursor to Restivus.addCollection()?
The text was updated successfully, but these errors were encountered: