Si quiero acceder a un controlador de esta forma:
Código HTML:
http:// ... /modulo/controlador
El problema viene cuando pongo:
Código HTML:
http:// ... /modulo/controlador/action
Por ejemplo:
http:// ... /admin/trabajo/crear
me sale lo siguiente:
Código PHP:
Fatal error: Uncaught exception 'Zend_Controller_Action_Exception' with message
'Action "crear" does not exist and was not trapped in __call()' in /Applications
/MAMP/htdocs/OperaSVN/library/Zend/Controller/Action.php:485 Stack trace: #0
/Applications/MAMP/htdocs/OperaSVN/library/Zend/Controller/Action.php(515):
Zend_Controller_Action->__call('crearAction', Array) #1 /Applications/MAMP/htdocs
/OperaSVN/library/Zend/Controller/Dispatcher/Standard.php(289):
Zend_Controller_Action->dispatch('crearAction') #2 /Applications/MAMP/htdocs
/OperaSVN/library/Zend/Controller/Front.php(946):
Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #3 /Applications/MAMP/htdocs
/OperaSVN/library/Bootstrap.php(159): Zend_Controller_Front->dispatch() #4
/Applications/MAMP/htdocs/OperaSVN/library/Bootstrap.php(42):
Bootstrap::_initFrontController() #5 /Applications/MAMP/htdocs/OperaSVN/public
/index.php(17): Bootstrap::main() #6 {main} thrown in /Applications/MAMP/htdocs
/OperaSVN/library/Zend/Controller/Action.php on line 485
El permisos que tengo son:
Código PHP:
$this->addRole(new Zend_Acl_Role('anonimo') );
$this->addRole(new Zend_Acl_Role('usuarioTematica'), 'anonimo' );
$this->addRole(new Zend_Acl_Role('usuarioGrupo'), 'anonimo' );
$this->addRole(new Zend_Acl_Role('admin'));
// Recursos de lo general a lo particular
$this->add(new Zend_Acl_Resource('default'));
$this->add(new Zend_Acl_Resource('grupo'));
$this->add(new Zend_Acl_Resource('tematica'));
$this->add(new Zend_Acl_Resource('admin'));
$this->add(new Zend_Acl_Resource('crear'));
$this->add(new Zend_Acl_Resource('usuario'));
// Asignar permisos
// guest
$this->allow('anonimo', array('default') );
$this->deny('anonimo', array('grupo', 'tematica', 'admin', 'usuario') );
// user
$this->allow('usuarioTematica', array('usuario', 'tematica') );
$this->deny('usuarioTematica', array('admin', 'admin'));
$this->allow('usuarioGrupo', array('usuario', 'grupo') );
$this->deny('usuarioGrupo', array('admin','crear'));
Gracias
Un saludo