Compare commits

...
2 Commits
Author SHA1 Message Date
mcndave e0402e7f3c Merge branch 'master' of https://git.mcnd.ca/mcndave/taxus 2026-07-14 16:52:30 -04:00
mcndave b20de0d44a - Added a new is method 2026-07-14 16:52:14 -04:00
+11
View File
@@ -6,6 +6,17 @@ trait UserEntityTrait
{
public ? Taxus $taxus;
public function is(string|array $privilegeName, ...$arguments) : bool
{
foreach((array) $privilegeName as $privilege) {
if ( $this->can($privilege, ...$arguments) ) {
return true;
}
}
return false;
}
public function can(string $privilegeName, ...$arguments) : bool
{
if (! $this->taxus) {