- @list ($rootlevel, $sublevel) = explode(' ', $permission);
- if ($sublevel and isset($this->admin[$rootlevel])) {
- return TRUE; # root match
+ preg_match_all('{[ /]}', $permission, $parts, PREG_OFFSET_CAPTURE);
+ foreach ($parts[0] as $part) {
+ if (isset($this->admin[substr($permission, 0, $part[1])])) {
+ return TRUE; # partial match
+ }