Skip to content

Commit

Permalink
Fix: visione documenti docente con stessa cattedra
Browse files Browse the repository at this point in the history
  • Loading branch information
trinko committed Jan 22, 2024
1 parent 09a79af commit 553e2a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Util/DocumentiUtil.php
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@ public function permessoLettura(Utente $utente, Documento $documento) {
// utente è tra i destinatari: ok
return true;
}
if ($documento->getTipo() == 'R' && ($utente instanceOf Docente)) {
if (in_array($documento->getTipo(), ['L', 'P', 'R']) && ($utente instanceOf Docente)) {
// documento di tipo relazione e utente docente
$cattedra = $this->em->getRepository('App\Entity\Cattedra')->findOneBy(['attiva' => 1,
'docente' => $utente, 'classe' => $documento->getClasse(), 'materia' => $documento->getMateria()]);
Expand Down

0 comments on commit 553e2a6

Please sign in to comment.