src/Controller/UpdateController.php
public function userUpdateAction(Request $request, string $section)
    {
        $section = $this->getSectionSchema($section);

        if (!$section->isOwnerAware()) {
            throw new NotFoundHttpException("Wrong setting section update.");
        }

        if (!$this->isGranted($request->attributes->get('_role', 'ROLE_USER'))) {
            throw new AccessDeniedHttpException("Access Denied!");
        }

        return $this->update($request, $section, (string)$this->getUser());
    }
public function userUpdateAction(Request $request, string $section)
    {
        $section = $this->getSectionSchema($section);

        if (!$section->isOwnerAware()) {
            throw new NotFoundHttpException("Wrong setting section update.");
        }

        if (!$this->isGranted($request->attributes->get('_role', 'ROLE_USER'))) {
            throw new AccessDeniedHttpException("Access Denied!");
        }

        return $this->update($request, $section, (string)$this->getUser());
    }
@param Request $request
@param string $section

@return Response