Skip to content

Commit 2a895f6

Browse files
committed
Expose ACL and user ID on request.
The PATCH handler needs ACL for detailed permission checking, as the full set of needed permissions is unknown until the patch document has been parsed.
1 parent d4315b4 commit 2a895f6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/handlers/allow.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,11 @@ function allow (mode) {
2727
suffix: ldp.suffixAcl,
2828
strictOrigin: ldp.strictOrigin
2929
})
30+
req.acl = acl
3031

3132
getUserId(req, function (err, userId) {
3233
if (err) return next(err)
34+
req.userId = userId
3335

3436
var reqPath = res && res.locals && res.locals.path
3537
? res.locals.path

0 commit comments

Comments
 (0)