mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-12-30 23:09:32 +00:00
Use imports instead of FQNs
This commit is contained in:
parent
f63b6d7207
commit
5629215ce4
179 changed files with 792 additions and 597 deletions
|
|
@ -41,15 +41,16 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Security\Voter;
|
||||
|
||||
use Symfony\Bundle\SecurityBundle\Security;
|
||||
use App\Entity\Parts\Part;
|
||||
use App\Entity\PriceInformations\Orderdetail;
|
||||
use App\Entity\UserSystem\User;
|
||||
use App\Services\UserSystem\PermissionManager;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Symfony\Component\Security\Core\Security;
|
||||
|
||||
class OrderdetailVoter extends ExtendedVoter
|
||||
{
|
||||
public function __construct(PermissionManager $resolver, EntityManagerInterface $entityManager, protected \Symfony\Bundle\SecurityBundle\Security $security)
|
||||
public function __construct(PermissionManager $resolver, EntityManagerInterface $entityManager, protected Security $security)
|
||||
{
|
||||
parent::__construct($resolver, $entityManager);
|
||||
}
|
||||
|
|
@ -71,7 +72,7 @@ class OrderdetailVoter extends ExtendedVoter
|
|||
};
|
||||
|
||||
//If we have no part associated use the generic part permission
|
||||
if (is_string($subject) || !$subject->getPart() instanceof \App\Entity\Parts\Part) {
|
||||
if (is_string($subject) || !$subject->getPart() instanceof Part) {
|
||||
return $this->resolver->inherit($user, 'parts', $operation) ?? false;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue