sakaiproject/Hilary — pull request #249 by simong (2013-02-22 10:02:13+00:00)
Title: `hasRole` and `hasAnyRole` both perform one more query than necessary

https://github.com/nicolaasmatthijs/Hilary/blob/c54806a289aa57cee9962a27b2936132854d67ec/node_modules/oae-authz/lib/api.js#L222

This check for a direct role is done in `_hasRole`, and then again in `getAllRoles`. The first check for the direct role is not necessary, and should reduce a large number of queries.