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

findTargetObjects method fetch all data from table #212

Open
KirillSuhodolov opened this issue Jan 24, 2016 · 0 comments
Open

findTargetObjects method fetch all data from table #212

KirillSuhodolov opened this issue Jan 24, 2016 · 0 comments

Comments

@KirillSuhodolov
Copy link

I found some strange behaviour with Permission Service
https://github.com/tjwebb/sails-permissions/blob/master/api%2Fservices%2FPermissionService.js#L56

        sails.hooks.blueprints.middleware.find(req, {
          ok: resolve,
          serverError: reject,
          // this isn't perfect, since it returns a 500 error instead of a 404 error
          // but it is better than crashing the app when a record doesn't exist
          notFound: reject
        });

req object does not contains any criteria, so find fetch all records from related model table. Is it permissible behaviour?

@KirillSuhodolov KirillSuhodolov changed the title findTargetObjects method fetch all data from database! findTargetObjects method fetch all data from table Jan 24, 2016
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

1 participant