mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-01 14:04:30 +02:00
Fixed some inspection issues.
This commit is contained in:
parent
e2f7aafa2d
commit
3fe452626d
9 changed files with 25 additions and 27 deletions
|
@ -76,12 +76,10 @@ class ElementPermissionListener
|
|||
$annotation = $reader->getPropertyAnnotation($property,
|
||||
ColumnSecurity::class);
|
||||
|
||||
if (null !== $annotation) {
|
||||
//Check if user is allowed to read info, otherwise apply placeholder
|
||||
if (!$this->security->isGranted($annotation->getReadOperationName(), $element)) {
|
||||
$property->setAccessible(true);
|
||||
$property->setValue($element, $annotation->getPlaceholder());
|
||||
}
|
||||
//Check if user is allowed to read info, otherwise apply placeholder
|
||||
if ((null !== $annotation) && !$this->security->isGranted($annotation->getReadOperationName(), $element)) {
|
||||
$property->setAccessible(true);
|
||||
$property->setValue($element, $annotation->getPlaceholder());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ use Symfony\Component\Security\Core\Authorization\Voter\Voter;
|
|||
*/
|
||||
class PartVoter extends ExtendedVoter
|
||||
{
|
||||
const READ = 'read';
|
||||
public const READ = 'read';
|
||||
|
||||
protected function supports($attribute, $subject)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue