fix(fixtureavatar): fixcture auto avatar & timesession & font & menu & redirect
This commit is contained in:
@ -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');
|
||||
|
Reference in New Issue
Block a user