Acl/Controller/Component/AclManagerComponent.php
public function get_missing_acos($update_hash_file = true)
	{
	    if($this->check_controller_hash_tmp_file())
	    {
	        $missing_aco_nodes = array();
	        
    		$stored_controller_hashes  = $this->get_stored_controllers_hashes();
    		$current_controller_hashes = $this->get_current_controllers_hashes();
    		
    		/*
    		 * Store current controllers hashes on disk
    		 */
    		if($update_hash_file)
    		{
        		$file = new File($this->controllers_hash_file);
        		$file->write(serialize($current_controller_hashes));
    		}
    		
    		/*
    		 * Check what controllers have changed
    		 */
    		$updated_controllers = array_keys(Set :: diff($current_controller_hashes, $stored_controller_hashes));
    		
    		if(!empty($updated_controllers))
    		{
    			$aco =& $this->Acl->Aco;
    			
    			foreach($updated_controllers as $controller_name)
    			{
    			    if($controller_name !== 'App')
    			    {
        			    $controller_classname = $this->AclReflector->get_controller_classname($controller_name);
        			    
        			    $methods = $this->AclReflector->get_controller_actions($controller_classname);
        			    
        			    $aco =& $this->Acl->Aco;
        			    foreach($methods as $method)
        			    {
        			        $methodNode = $aco->node('controllers/' . $controller_name . '/' . $method);
        			        if(empty($methodNode))
        			        {
        			            $missing_aco_nodes[] = $controller_name . '/' . $method;
        			        }
        			    }
    			    }
    			}
    		}
    		
    		return $missing_aco_nodes;
	    }
	}
public function get_missing_acos($update_hash_file = true)
	{
	    if($this->check_controller_hash_tmp_file())
	    {
	        $missing_aco_nodes = array();
	        
    		$stored_controller_hashes  = $this->get_stored_controllers_hashes();
    		$current_controller_hashes = $this->get_current_controllers_hashes();
    		
    		/*
    		 * Store current controllers hashes on disk
    		 */
    		if($update_hash_file)
    		{
        		$file = new File($this->controllers_hash_file);
        		$file->write(serialize($current_controller_hashes));
    		}
    		
    		/*
    		 * Check what controllers have changed
    		 */
    		$updated_controllers = array_keys(Set :: diff($current_controller_hashes, $stored_controller_hashes));
    		
    		if(!empty($updated_controllers))
    		{
    			$aco =& $this->Acl->Aco;
    			
    			foreach($updated_controllers as $controller_name)
    			{
    			    if($controller_name !== 'App')
    			    {
        			    $controller_classname = $this->AclReflector->get_controller_classname($controller_name);
        			    
        			    $methods = $this->AclReflector->get_controller_actions($controller_classname);
        			    
        			    $aco =& $this->Acl->Aco;
        			    foreach($methods as $method)
        			    {
        			        $methodNode = $aco->node('controllers/' . $controller_name . '/' . $method);
        			        if(empty($methodNode))
        			        {
        			            $missing_aco_nodes[] = $controller_name . '/' . $method;
        			        }
        			    }
    			    }
    			}
    		}
    		
    		return $missing_aco_nodes;
	    }
	}
public function get_missing_acos ( $ update_hash_file = true ) { if ( $ this -> check_controller_hash_tmp_file ( ) ) { $ missing_aco_nodes = array ( ) ; $ stored_controller_hashes = $ this -> get_stored_controllers_hashes ( ) ; $ current_controller_hashes = $ this -> get_current_controllers_hashes ( ) ; /*
    		 * Store current controllers hashes on disk
    		 */ if ( $ update_hash_file ) { $ file = new File ( $ this -> controllers_hash_file ) ; $ file -> write ( serialize ( $ current_controller_hashes ) ) ; } /*
    		 * Check what controllers have changed
    		 */ $ updated_controllers = array_keys ( Set :: diff ( $ current_controller_hashes , $ stored_controller_hashes ) ) ; if ( ! empty ( $ updated_controllers ) ) { $ aco = & $ this -> Acl -> Aco ; foreach ( $ updated_controllers as $ controller_name ) { if ( $ controller_name !== 'App' ) { $ controller_classname = $ this -> AclReflector -> get_controller_classname ( $ controller_name ) ; $ methods = $ this -> AclReflector -> get_controller_actions ( $ controller_classname ) ; $ aco = & $ this -> Acl -> Aco ; foreach ( $ methods as $ method ) { $ methodNode = $ aco -> node ( 'controllers/' . $ controller_name . '/' . $ method ) ; if ( empty ( $ methodNode ) ) { $ missing_aco_nodes [ ] = $ controller_name . '/' . $ method ; } } } } } return $ missing_aco_nodes ; } }
Get a list of plugins, controllers and actions that don't have any corresponding ACO.
To run faster, the method only checks controllers that have not already been checked or that have been modified.

Depending on the $update_hash_file, the method may return the missing ACOs only once
(in order to show the alert message only once in the view)

@param boolean $update_hash_file If true, the method update the controller hash file, making the method returning missing ACOs only once
@return array Array of missing ACO nodes by comparing with each existing plugin, controller and action
Get a list of plugins controllers and actions that don t have any corresponding ACO . To run faster the method only checks controllers that have not already been checked or that have been modified .