- Removed NULL and added a new Enum instead

This commit is contained in:
Dave Mc Nicoll committed 2024-06-02 23:02:56 +00:00
1 parent 72be397a72
commit ba754c6be8
3 files changed
+20 -2

No files matched your search

+3 -1
View File
@@ -12,7 +12,9 @@ trait UserEntityTrait
throw new \Exception("An instance of Taxus must be linked to this object.");
}
return $this->taxus->granted($privilegeName, ...$arguments);
$grant = $this->taxus->granted($privilegeName, ...$arguments);
return is_bool($grant) ? $grant : $grant === TaxusGrantEnum::Authorized;
}
public function cannot(string $privilegeName, ...$arguments) : bool