mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-24 18:58:46 +02:00
Use the new VoterHelper in voters
This commit is contained in:
parent
fc6643bd6f
commit
6be55d1837
16 changed files with 146 additions and 162 deletions
|
@ -107,4 +107,18 @@ final class VoterHelper
|
|||
//Otherwise throw an exception
|
||||
throw new \RuntimeException('The user could not be resolved.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the permission operation combination with the given names is existing.
|
||||
* Just a proxy to the permission manager.
|
||||
*
|
||||
* @param string $permission the name of the permission which should be checked
|
||||
* @param string $operation the name of the operation which should be checked
|
||||
*
|
||||
* @return bool true if the given permission operation combination is existing
|
||||
*/
|
||||
public function isValidOperation(string $permission, string $operation): bool
|
||||
{
|
||||
return $this->permissionManager->isValidOperation($permission, $operation);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue