mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-01-05 09:49:33 +00:00
Allow to cache support status of voters
This should increase the performance a bit
This commit is contained in:
parent
879b702fc1
commit
7b6ba37667
14 changed files with 133 additions and 2 deletions
|
|
@ -90,4 +90,14 @@ final class OrderdetailVoter extends Voter
|
|||
|
||||
return false;
|
||||
}
|
||||
|
||||
public function supportsAttribute(string $attribute): bool
|
||||
{
|
||||
return in_array($attribute, self::ALLOWED_PERMS, true);
|
||||
}
|
||||
|
||||
public function supportsType(string $subjectType): bool
|
||||
{
|
||||
return $subjectType === 'string' || is_a($subjectType, Orderdetail::class, true);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue