Right now the code uses
return next(Boom.forbidden('Insufficient scope - ' + config.scope + ' expected'));
With scope configured like this:
scope: ['delete:users', 'delete:current_user']
It results in the following error message: 'Insufficient scope - delete:users,delete:current_user expected'.
Since it is just joining the array elements with commas it is not clear if the expected scopes are any of those or all of those. I think a possible improvement could be: 'Insufficient scope, expected any of: delete:users, delete:current_user'.
Thoughts?
Right now the code uses
With scope configured like this:
It results in the following error message:
'Insufficient scope - delete:users,delete:current_user expected'.Since it is just joining the array elements with commas it is not clear if the expected scopes are any of those or all of those. I think a possible improvement could be:
'Insufficient scope, expected any of: delete:users, delete:current_user'.Thoughts?