public function isAllowed($action, $role = null)
    {
        if ($this->_acl_entity === null)
        {
            return $this->getACL()->getDefaultPolicy(); 
        }
    
        if ($role === null)
        {
            $role = $this->getACL()->getCurrentRole();
        }
    
        return $this->_acl_entity->isAllowed($role, $action, array(get_class($this), "loadByACLID"));
    }