tmaiaroto/li3_access — Issue #14: AuthRbac::parseMatch() can't deal with namespaces
Author: mariano
Created: 2012-01-10 12:07:19+00:00
State: open

This is a biggie. parseMatch()'s regex can't deal with namespaces, which makes (for example) the test suite impossible to add a rule for. Ideally you want to be able to do:

```php
Access::config(array('default' => array(
'adapter' => 'AuthRbac',
'roles' => array(
array(
'requesters' => 'devs'
'match' => 'lithium\test\Controller::*'
)
));
```

But naturally this affects any namespace you wish to use, making it impossible to deal with more than one controller named the same way, but with different namespace.

Also, on a small note, the preg_match() can take the controller and action right from the match, without the need for the extra `explode()` call.

Coming up a pull request with a fix and tests for the fix.