Example #1
0
 function test_accion_inexistente()
 {
     try {
         toba::derechos()->validar("inexistente");
         $this->fail();
     } catch (toba_error_def $e) {
         $this->pass();
     }
 }
Example #2
0
 function ini()
 {
     $texto = '';
     if (toba::derechos()->validar('derecho_a', false)) {
         $texto .= "El grupo de acceso actual posee el derecho 'derecho_a'<br>";
     } else {
         $texto .= "El grupo de acceso actual NO posee el derecho 'derecho_a'<br>";
     }
     if (toba::derechos()->validar('derecho_b', false)) {
         $texto .= "El grupo de acceso actual posee el derecho 'derecho_b'<br>";
     } else {
         $texto .= "El grupo de acceso actual NO posee el derecho 'derecho_b'<br>";
     }
     $this->pantalla()->set_descripcion($texto);
 }