mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-12-19 09:29:31 +00:00
Merge branch 'master' into log_detail_page
This commit is contained in:
commit
4c6ceab8e8
291 changed files with 1994 additions and 1621 deletions
|
|
@ -32,7 +32,7 @@ use function in_array;
|
|||
|
||||
class AttachmentVoter extends ExtendedVoter
|
||||
{
|
||||
protected $security;
|
||||
protected Security $security;
|
||||
|
||||
public function __construct(PermissionManager $resolver, EntityManagerInterface $entityManager, Security $security)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ class ParameterVoter extends ExtendedVoter
|
|||
return $this->resolver->inherit($user, $param, $attribute) ?? false;
|
||||
}
|
||||
|
||||
protected function supports(string $attribute, $subject)
|
||||
protected function supports(string $attribute, $subject): bool
|
||||
{
|
||||
if (is_a($subject, AbstractParameter::class, true)) {
|
||||
//These are the allowed attributes
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ class StructureVoter extends ExtendedVoter
|
|||
}
|
||||
|
||||
/**
|
||||
* Maps a instance type to the permission name.
|
||||
* Maps an instance type to the permission name.
|
||||
*
|
||||
* @param object|string $subject The subject for which the permission name should be generated
|
||||
*
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ class UserVoter extends ExtendedVoter
|
|||
}
|
||||
}
|
||||
|
||||
//Else just check users permission:
|
||||
//Else just check user permission:
|
||||
if ($this->resolver->isValidOperation('users', $attribute)) {
|
||||
return $this->resolver->inherit($user, 'users', $attribute) ?? false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue