Try the following code (From a internal-only Controller):
public function preDispatch()
{
// prevent requesting this controller by URL, only
action-view-helper/ajax calls are allowed
if ($this->getFrontController()->getRequest()->getControllerName()
== $this->getRequest()->getControllerName() &&
$this->getFrontController()->getRequest()->getModuleName() ==
$this->getRequest()->getModuleName() &&
!$this->getRequest()->isXmlHttpRequest()) {
return $this->_helper->forward404();
}
}
On Sun, Nov 30, 2008 at 8:33 PM, Thorsten Ruf <[EMAIL PROTECTED]>wrote:
> The main problem with view action helpers is, you (the user) can access the
> action simply by accessing the appropiate url, too. The access can not be
> restricted in any way. I was looking for a alternative to grant access only
> to "internal" access. Maybe Matthew can say something about handling such a
> requirement?
>
>
> On Sun, Nov 30, 2008 at 17:24, Joó Ádám <[EMAIL PROTECTED]> wrote:
>
>> Check out the action view helper:
>>
>> http://framework.zend.com/manual/en/zend.view.helpers.html#zend.view.helpers.initial.action
>> You could call it in your layout script.
>>
>>
>> Regards,
>> Ádám
>>
>
>
--
Kind regards,
-behzad