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

RestrictToOwner now takes an array #231

Merged
merged 1 commit into from Jul 7, 2016

Conversation

Projects
None yet
2 participants
@sscaff1
Copy link
Contributor

sscaff1 commented Jul 5, 2016

Basic use case:

  • You have a model (let's call it a team model) with an array ids as admins
  • You want to check who has permission to modify the team by checking the authenticated user against the admin array

If you guys don't think this type of functionality is appropriate in the bundled hooks, I understand. Just thought I would throw it out there since I just ran into a use case for this functionality in the project I'm currently working on.

@ekryski

This comment has been minimized.

Copy link
Member

ekryski commented Jul 7, 2016

Yes I think this is good! Thanks @sscaff1! We're going to be revisiting/putting up a proposal for normalizing permissions and probably moving the auth hooks to their own repo but this will definitely go in for now! Thanks for the PR! 😄

@ekryski ekryski merged commit 50a37a2 into feathersjs:master Jul 7, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.