diff --git a/src/Xacmlphp/Decider.php b/src/Xacmlphp/Decider.php index 952c4f1..6928455 100644 --- a/src/Xacmlphp/Decider.php +++ b/src/Xacmlphp/Decider.php @@ -52,7 +52,7 @@ public function getSubjectAttributes() * * @return bool */ - public function evaluate(Subject $subject, PolicySet $policySet, Action $action) + public function evaluate(Subject $subject, PolicySet $policySet, Action $action = null) { // get the subject's attributes $this->setSubjectAttributes($subject->getAttributes()); @@ -147,4 +147,4 @@ public function handleMatches(array $matches) } return $results; } -} \ No newline at end of file +} diff --git a/src/Xacmlphp/Enforcer.php b/src/Xacmlphp/Enforcer.php index 6988e72..1d2e1e6 100644 --- a/src/Xacmlphp/Enforcer.php +++ b/src/Xacmlphp/Enforcer.php @@ -60,7 +60,7 @@ public function getDecider() * * @return bool Allowed/not allowed status */ - public function isAuthorized(Subject $subject, Resource $resource, Action $action) + public function isAuthorized(Subject $subject, Resource $resource, Action $action = null) { $decider = $this->getDecider(); if ($decider === null) { @@ -71,4 +71,4 @@ public function isAuthorized(Subject $subject, Resource $resource, Action $actio return $decider->evaluate($subject, $policies, $action); } -} \ No newline at end of file +}