Uh oh!
There was an error while loading. Please reload this page.
Fix context passing in OWNER role resolver - #3230
Conversation
| Role.isOwner = function isOwner(modelClass, modelId, userId, principalType, options, callback) { | ||
| if (!callback && typeof options === 'function') { | ||
| callback = options; | ||
| options = {}; |
There was a problem hiding this comment.
This branch is not covered by any test, coveralls reports "Coverage decreased (-0.04%) to 89.558%" as a result. I think we can ignore that, but please let me know if you disagree!
(The solution is to add a test that explicitly calls Role.isOwner(modelClass, modelId, userId, principalType, callback).)
ebarault
commented
Mar 3, 2017
sorry to wake after the battle @bajtos |
Description
With the move to explicit context passing of an
optionsobject, internal calls tofindetc need to be updated to pass the necessary information along, too. In this case,isOwnercallsfindByIdon a Model, but does not pass an access token inoptions.cc @DaGaMs@ebarault
Related issues
isOwner#3211Checklist
guide