Commit 574a6927 authored by Jean-Philippe Metivier's avatar Jean-Philippe Metivier
Browse files

Correction de bug à la marge

parent 01269a63
Loading
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -200,6 +200,7 @@ abstract class AbstractPrivilege implements PrivilegeInterface, ResourceInterfac
    public function addRole(RoleInterface $role)
    {
        $this->roles->add($role);
        $role->addPrivilege($this);

        return $this;
    }
@@ -213,7 +214,7 @@ abstract class AbstractPrivilege implements PrivilegeInterface, ResourceInterfac
    public function removeRole(RoleInterface $role)
    {
        $this->roles->removeElement($role);

        $role->removePrivilege($this);
        return $this;
    }

+1 −1
Original line number Diff line number Diff line
@@ -194,7 +194,7 @@ class PrivilegeService implements PrivilegeProviderInterface, ResourceProviderIn
        }

        try {
            $this->getEntityManager()->flush($privilege);
            $this->getEntityManager()->flush();
        } catch (ORMException $e) {
            throw new RuntimeException("Un problème est survenu lors du changement de privilège \"" . $privilege->getLibelle() . "\" pour le rôle \"" . $role->getLibelle() . "\".", $e);
        }