Skip to content

Commit 167724c

Browse files
authored
Merge branch 'master' into master
2 parents e629f31 + cfc237b commit 167724c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lib/routes/helper.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,13 @@ helper.verifyRequest = (request, resourceConfig, res, handlerRequest, callback)
7171
})
7272
}
7373

74-
if (!resourceConfig.handlers[handlerRequest]) {
74+
// for crud operation support, we need skip over any ChainHandlers to check what the actual store supports
75+
let finalHandler = resourceConfig.handlers
76+
while (finalHandler.otherHandler) {
77+
finalHandler = finalHandler.otherHandler
78+
}
79+
80+
if (!finalHandler[handlerRequest]) {
7581
return helper.handleError(request, res, {
7682
status: '403',
7783
code: 'EFORBIDDEN',

0 commit comments

Comments
 (0)