fix(fixtureavatar): fixcture auto avatar & timesession & font & menu & redirect
Some checks failed
Cadoles/nineskeletor/pipeline/head There was a failure building this commit
Cadoles/nineskeletor/pipeline/pr-master There was a failure building this commit

This commit is contained in:
2022-10-04 13:46:14 +02:00
parent 3d1c5a2159
commit ffe8f2f722
12 changed files with 491 additions and 11 deletions

View File

@ -722,9 +722,9 @@ class UserController extends AbstractController
case 'manager':
if ($this->getUser()->getNiveau03() && $this->getUser()->getNiveau03() == $entity->getNiveau03()) {
return true;
} elseif ($this->getUser()->getNiveau02() && $this->getUser()->getNiveau02() == $entity->getNiveau02()) {
} elseif (!$this->getUser()->getNiveau03() && $this->getUser()->getNiveau02() && $this->getUser()->getNiveau02() == $entity->getNiveau02()) {
return true;
} elseif ($this->getUser()->getNiveau01() && $this->getUser()->getNiveau01() == $entity->getNiveau01()) {
} elseif (!$this->getUser()->getNiveau02() && $this->getUser()->getNiveau01() && $this->getUser()->getNiveau01() == $entity->getNiveau01()) {
return true;
}
@ -759,6 +759,19 @@ class UserController extends AbstractController
return true;
break;
case 'manager':
if ($this->getUser()->getNiveau03() && $this->getUser()->getNiveau03() == $entity->getNiveau03()) {
return true;
} elseif (!$this->getUser()->getNiveau03() && $this->getUser()->getNiveau02() && $this->getUser()->getNiveau02() == $entity->getNiveau02()) {
return true;
} elseif (!$this->getUser()->getNiveau02() && $this->getUser()->getNiveau01() && $this->getUser()->getNiveau01() == $entity->getNiveau01()) {
return true;
}
throw $this->createAccessDeniedException('Permission denied');
break;
case 'all':
if ($this->getUser()->getId() != $entity->getId()) {
throw $this->createAccessDeniedException('Permission denied');