Compare commits
2 Commits
e134e81334
...
e0402e7f3c
| Author | SHA1 | Date | |
|---|---|---|---|
| e0402e7f3c | |||
| b20de0d44a |
@ -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) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user