diff --git a/build/api/core/ModuleRequest.php b/build/api/core/ModuleRequest.php index 6398579..c64b2bf 100755 --- a/build/api/core/ModuleRequest.php +++ b/build/api/core/ModuleRequest.php @@ -126,7 +126,6 @@ /* [2] On verifie que la methode est amorcable =========================================================*/ if( !is_callable($this->getFunctionCaller()) ){ - var_dump($this->getFunctionCaller()); $this->error = Error::UncallableMethod; return new ModuleResponse($this->error); } @@ -379,8 +378,10 @@ $granted = Authentification::permission($this->path['module'], $method['permissions']); /* (1) On retourne FAUX si aucun droit n'a ete trouve */ - if( $granted !== Error::Success ) - $this->error = Error::PermissionError; + if( $granted !== Error::Success ){ + $this->error = $granted; + return false; + } /* [3] On retourne VRAI si la permission est ok