Uh oh!
There was an error while loading. Please reload this page.
extend range of status allowed/denied - #12
Conversation
slnode
commented
Jun 6, 2014
Can one of the admins verify this patch? To accept patch and trigger a build add comment ".ok\W+to\W+test." |
bajtos
commented
Jun 6, 2014
Hi @karlmikko, thank you for the pull request. I am little bit worried that if the tests treat all of How about adding a global config option for specifying the "access denied" status code value? helpers.accessDeniedStatusCode=401;_it.shouldBeAllowed=function(){it('should be allowed',function(){assert(this.req);assert(this.res);assert.notEqual(this.res.statusCode,helpers.accessDeniedStatusCode);});}_it.shouldBeDenied=function(){it('should not be allowed',function(){assert(this.res);varstatus=this.res.statusCode;assert.equals(status,helpers.accessDeniedStatusCode);});}@ritch what's your opinion? |
bajtos
commented
Jun 6, 2014
On the second thought, |
karlmikko
commented
Jun 6, 2014
I will change to match that pattern |
extend range of status allowed/denied
bajtos
commented
Jun 9, 2014
Landed, thank you for the contribution. |
slnode
commented
Jun 9, 2014
Can one of the admins verify this patch? To accept patch and trigger a build add comment ".ok\W+to\W+test." |
There was a problem hiding this comment.
Nitpitck: < 400 would be a bit easier to read IMO
There was a problem hiding this comment.
Yes, that was my first thought too when I saw this code. This line is going to be changed by #15 anyway.
see strongloop/loopback#301