machuga/authority-l4 — pull request #3 by conarwelsh (2013-05-01 19:51:55+00:00)
Title: Initial Filter Logic

This is the basic filter logic, not completely tested yet for off-cases. I wanted to show you the basic logic before I test too far.

couple things to look at:

1) ServiceProvider: this is where the filter is registered. Take note of how we are bouncing an un-authorized request.

2) We are currently setup to match the resource to a rule by using either the name of the route or the action. I think name is cleaner, but action may make more sense. All routes have names, however not all routes have an action like that. This is not an issue if only used in a resourceful controller, but it may be nice to give them the option of adding this filter to route closures as well. There is a "resource_match" config option that currently allows the toggling of this for my testing, not sure that we want to keep that there though.

3) Check how the deny_action is defined in the config

4) Check how we are mapping the authority action to the route. I am using the HTTP method at the moment, which works perfect if they are using the standards, but maybe not standard enough.

Let me know what you think, there is a lot of room for alterations here, its a matter of what standards we want to enforce.