ZF-Commons/zfc-rbac — pull request #149 by arekkas (2013-12-29 16:42:30+00:00)
Title: ControllerGuard now supports assertion

Hi,

since I needed this myself I thought this might be a good addition to guards in general. I've only implemented this for the ControllerGuard yet, to see if this is a desired feature.

The idea is very simple and much like the `isGranted($permission, $assertion)`, only that it works for guards as well. An example config is:

```
[
'controller' => 'BlogController',
'roles' => 'admin',
'assertion' => function ($identity) {
return false;
}
]
```

Of course, this works with classes implementing the `AssertionInterface` as well.

Tests have already been added and updated.