protected function matchAuthzGroupPaths($pattern, $subject)
    {
        $regex = '^' . str_replace('[^/]+', '\\*', preg_quote($pattern, '~')) . '$';
        $regex = str_replace('\\*', '(.*)', $regex);

        $match = preg_match('~' . $regex . '~i', $subject);

        return $match;
    }