Commit 0364a982 authored by David Surville's avatar David Surville
Browse files

[Fix] Suppression des restrictions au niveau du roleId

parent a27dc23e
Loading
Loading
Loading
Loading
+10 −10
Original line number Diff line number Diff line
@@ -190,16 +190,16 @@ class RoleForm extends Form
                            'break_chain_on_failure' => true,
                        ],
                    ],
                    [
                        'name' => Regex::class,
                        'options' => [
                            'pattern' => '/^[a-z0-9_-]+$/',
                            'messages' => [
                                Regex::NOT_MATCH => "Seuls les caractères suivants sont autorisés : [a-z, 0-9, _, -].",
                            ],
                            'break_chain_on_failure' => true,
                        ],
                    ],
//                    [
//                        'name' => Regex::class,
//                        'options' => [
//                            'pattern' => '/^[a-z0-9_-]+$/',
//                            'messages' => [
//                                Regex::NOT_MATCH => "Seuls les caractères suivants sont autorisés : [a-z, 0-9, _, -].",
//                            ],
//                            'break_chain_on_failure' => true,
//                        ],
//                    ],
                    [
                        'name' => Callback::class,
                        'options' => [
+5 −2
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@ use Zend\Hydrator\Strategy\StrategyInterface;
class RoleParentStrategy implements StrategyInterface
{
    use RoleServiceAwareTrait;

    /**
     * {@inheritDoc}
     */
@@ -16,6 +17,7 @@ class RoleParentStrategy implements StrategyInterface
        if (null != $value) {
            return $value->getId();
        }

        return null;
    }

@@ -24,10 +26,11 @@ class RoleParentStrategy implements StrategyInterface
     */
    public function hydrate($value)
    {
        if ($value !== null AND trim($value) !== '') {
        if (null != $value) {
            $parent = $this->roleService->find($value);
            return $parent;
        }

        return null;
    }
}
 No newline at end of file