Note that there are some explanatory texts on larger screens.

plurals
  1. PODoes Zend_Acl ristricts access to other module's model, mapper class access too?
    primarykey
    data
    text
    <p>I am using Zend Modular Application approach. I have setup Zend_Acl module wise. I have already one Mapper class say <code>Default_Model_AirlineMapper</code> set up in Default Module.</p> <pre><code>class Default_Model_AirlineMapper extends Model_AbstractMapper { public static function fetchAll($columns = null) { $dbTableObj = new Default_Model_DbTable_Airline(); $select = $dbTableObj-&gt;select(); if( is_array($columns) &amp;&amp; sizeof($columns) &gt; 0 ) $select-&gt;from($dbTableObj, $columns ); return $dbTableObj-&gt;fetchAll( $select ); } } </code></pre> <p>Now I am trying to access this <code>Default_Model_AirlineMapper</code> from admin module controller like</p> <pre><code>public function employeepreferredairlinesAction(){ $dom_airlines = Default_Model_AirlineMapper::fetchAll(array('airline_id','airline_name'), null, array('airline_name asc')); $this-&gt;view-&gt;dom_airline_dd = Zend_Json::encode($dom_airlines); } </code></pre> <p>I have set up access check plugin for default module like</p> <pre><code>class Default_Plugin_AccessCheck extends Zend_Controller_Plugin_Abstract { public function preDispatch(Zend_Controller_Request_Abstract $request) { if('default' === ($module = $request-&gt;getModuleName())){ // Do acl check }else{ // throw it to default login $request-&gt;setModuleName('default')-&gt;setControllerName('index')-&gt;setActionName('login'); } } } </code></pre> <p>In short when i try to access <code>Default_Model_AirlineMapper::fetchAll()</code> it thows me to default modele login page, but when I comment it, it works fine.</p> <p>What is happening here I am not getting. it is only possible when default modules <code>Bootstrap.php</code> get executed, but I am working and accessing from admin module. Please explain.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload