fix code escape error in ModuleRequest

This commit is contained in:
xdrm-brackets 2016-11-08 10:32:02 +01:00
parent df976d1315
commit 7880651c5d
1 changed files with 4 additions and 3 deletions

View File

@ -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