/** * Checks rule controller and action against actual request * Also takes care of globs * * @param $ruleController * @param $ruleAction * @return bool */ private function isRuleAMatchFor($ruleController, $ruleAction) { if (($ruleController === $this->requestParser->getControllerName() || $ruleController === '*') && ($ruleAction === $this->requestParser->getControllerMethod() || $ruleAction === '*')) { return true; } return false; }
/** * Check if this request goes to our defaultPermissionDenied route * or a permissionDenied method. Those need to be allowed, always! * * @return boolean */ private function isRequestToDefaultRouteOrPermissionDeniedMethod() { // Check if request goes to method permissionDenied // We need to always allow that or we might end in an infinite loop if ($this->requestParser->getControllerMethod() === 'permissionDenied') { return true; } else { if ($this->permissionParser->hasNoPermissionRoute() && $this->permissionParser->getNoPermissionRoute() === $this->request->path()) { return true; } else { return false; } } }