OptimalBits / node_acl

Access control lists for node applications
2.62k stars 371 forks source link

acl/middleware: support `req.user.id` for userId #149

Closed nemtsov closed 9 years ago

nemtsov commented 9 years ago

It's fairly common for express apps to have the logged-in user in req.user. This is shown in the express docs as well as in the popular Passport module (which exposes the user as req.user).

Thus, this change will make it easier to integrate acl with Passport and with non-browser-facing services (APIs) that don't use sessions (and do oauth instead, for example).

muka commented 9 years ago

:+1: me too

nemtsov commented 9 years ago

@manast is this something you're interested in including into the lib?

manast commented 9 years ago

sorry for the late merge

nemtsov commented 9 years ago

Awesome. Thanks.