machuga/authority — pull request #10 by stokic (2013-03-29 14:17:32+00:00)
Title: getRulesFor method needs to check resource as well as action/alias

I was testing Authority on a simple app and I've noticed a strange behavior of getRulesFor() method.

It's easier to explain in images so here it is:

http://d.pr/i/51sf - this is current situation, from my understanding of Authority this rule set should only deny View Admin, all other action/resource combinations are allowed but as you can see every View action is denied and I believe this is because there is no check for resource in getRulesFor()

http://d.pr/i/DJv7 - my updated method, can returns true for action/resource combinations accept view/admin which is denied in one of the rules

I was very hesitant to ask for this pull request because I might have missed something in Authority package and I apologize if I'm wasting your time but this fix just feels natural to me.

Thanks