mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-12-13 06:29:30 +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
|
|
@ -76,6 +76,11 @@ final class StructureVoter extends Voter
|
|||
return false;
|
||||
}
|
||||
|
||||
public function supportsType(string $subjectType): bool
|
||||
{
|
||||
return $subjectType === 'string' || $this->instanceToPermissionName($subjectType) !== null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Maps an instance type to the permission name.
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue