Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Xacmlphp/Decider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down Expand Up @@ -147,4 +147,4 @@ public function handleMatches(array $matches)
}
return $results;
}
}
}
4 changes: 2 additions & 2 deletions src/Xacmlphp/Enforcer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -71,4 +71,4 @@ public function isAuthorized(Subject $subject, Resource $resource, Action $actio

return $decider->evaluate($subject, $policies, $action);
}
}
}