tmaiaroto/li3_access — Issue #16: AuthRbac should accept a closure in 'allow', not only arrays
Author: mariano
Created: 2012-01-11 14:49:49+00:00
State: open

More often than not when you use the 'role' option in an AuthRbac rule to specify your own closure, you only use one closure. Currently such a rule has to be written as:

```php
array(
'requesters' => '*',
'match' => 'Users::signup',
'allow' => array(
function($request, $options) {
return !Auth::check('default');
}
)
)
```

Ideally you want to write this without the array, as such:

```php
array(
'requesters' => '*',
'match' => 'Users::signup',
'allow' => function($request, $options) {
return !Auth::check('default');
}
)
```

Coming up a pull request with change + tests to improve this.