Commit 15250709 authored by Stéphane Bouvry (perso)'s avatar Stéphane Bouvry (perso)
Browse files

Fix accès

parent 11dfd84e
Loading
Loading
Loading
Loading
+2 −0
Changes for module/Oscar/src/Oscar/Controller/ProjectController.php: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -189,6 +189,8 @@ class ProjectController extends AbstractOscarController
        $form->init();
        $form->bind($entity);

        $this->getOscarUserContext()->check(Privileges::PROJECT_EDIT);

        /** @var Request $request */
        $request = $this->getRequest();
        if ($this->getRequest()->isPost()) {
+2 −2
Changes for module/Oscar/src/Oscar/Controller/ProjectGrantController.php: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -1100,11 +1100,11 @@ class ProjectGrantController extends AbstractOscarController
        // Contrôle des droits
        if ($projectId) {
            $project = $this->getProjectService()->getProject($projectId);
            $this->getOscarUserContext()->hasPrivileges(Privileges::PROJECT_EDIT,
            $this->getOscarUserContext()->check(Privileges::PROJECT_EDIT,
                $project);
        } else {
            $project = null;
            $this->getOscarUserContext()->hasPrivileges(Privileges::ACTIVITY_EDIT);
            $this->getOscarUserContext()->check(Privileges::ACTIVITY_EDIT);
        }

        $projectGrant = new Activity();