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

Async authorization #15

Open
normanrz opened this issue Mar 6, 2014 · 1 comment
Open

Async authorization #15

normanrz opened this issue Mar 6, 2014 · 1 comment

Comments

@normanrz
Copy link

normanrz commented Mar 6, 2014

Have you considered making the authorization methods async?
Something like:

UserModel.statics.authorize = (req, cb) ->
  doStuff(req, ->
    permission = 
      read: true
      write: true
    cb(null, permission)
  )
  return
@yocontra
Copy link
Member

yocontra commented Mar 6, 2014

This should work already

https://github.com/wearefractal/crudify/blob/master/lib/util/authorizeRead.coffee#L19-L20

The documentation sucks though

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