Commit 57f3297b authored by Laurent Lécluse's avatar Laurent Lécluse
Browse files

Ajout de commentaires activables pour tracer les exécutions d'assertions

parent c2e7a7cd
......@@ -74,7 +74,7 @@ abstract class AbstractAssertion implements AssertionInterface, ServiceLocatorAw
$this->init();
switch (true) {
case $this->detectPrivilege($resource):
// var_dump('assertPrivilege '.get_class($this).' '.$resource->getResourceId().' '.$privilege);
return $this->assertPrivilege(ltrim(strstr($resource, '/'), '/'), $privilege);
case $this->detectController($resource):
......@@ -85,14 +85,15 @@ abstract class AbstractAssertion implements AssertionInterface, ServiceLocatorAw
$controller = substr($resource, $spos, $dpos - $spos - 1);
$action = substr($resource, $dpos);
// var_dump('assertController '.get_class($this).' '.$controller.'.'.$action.' '.$privilege);
return $this->assertController($controller, $action, $privilege);
case $this->detectEntity($resource):
// var_dump('assertEntity '.get_class($this).' '.$resource->getResourceId().' '.$privilege);
return $this->assertEntity($resource, $privilege);
default:
// var_dump('assertOther '.get_class($this).' '.$resource->getResourceId().' '.$privilege);
return $this->assertOther($resource, $privilege);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment