toymachiner62 / hapi-authorization

ACL plugin for hapijs
MIT License
80 stars 25 forks source link

forbiddenHandler - Optional config property #21

Closed kamboyer closed 7 years ago

kamboyer commented 7 years ago

Allows for a optional plugin config property which allows for a callback to passed through the ACL.checkRoles function. This gives the implementor the ability to handle the forbidden response instead of being globally returned the Boom.unauthorized 403.

Passes through the request and reply objects so the implementor can continue the request lifecycle as they see fit.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.06%) to 95.455% when pulling 396754bf8079ff0da11ac3fd4cb9102112d73501 on kamboyer:forbiddenHandler into 13b5336a31218c194a488747ffed90fad51436fa on toymachiner62:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.06%) to 95.455% when pulling 396754bf8079ff0da11ac3fd4cb9102112d73501 on kamboyer:forbiddenHandler into 13b5336a31218c194a488747ffed90fad51436fa on toymachiner62:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.06%) to 95.455% when pulling 396754bf8079ff0da11ac3fd4cb9102112d73501 on kamboyer:forbiddenHandler into 13b5336a31218c194a488747ffed90fad51436fa on toymachiner62:master.

kamboyer commented 7 years ago

@toymachiner62 Do you follow any cadence or approach to taking merges?

toymachiner62 commented 7 years ago

@kamboyer Nothing formal. I review as I have time.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.06%) to 95.455% when pulling 3586a9d4932354561b0c3ebd30f574c6a3f7ec6e on kamboyer:forbiddenHandler into 13b5336a31218c194a488747ffed90fad51436fa on toymachiner62:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.06%) to 95.455% when pulling 3586a9d4932354561b0c3ebd30f574c6a3f7ec6e on kamboyer:forbiddenHandler into 13b5336a31218c194a488747ffed90fad51436fa on toymachiner62:master.

kamboyer commented 7 years ago

I have since changed my opinion on this PR