You do all this stuff with beforeFilters. F.i.
//__construct()
$this->beforeFilter(array('forbiddenAction'=>array('except'=>array('index','show'))));
function forbiddenAction()
{
//redirect or die
}
Now all actions except index and show are forbidden.
You need some conditionals though (for your admin-user)
$this->beforeFilter('protectMyActions');
function protectMyActions()
{
$current_action = $this->getActionName();
// now it depends on your models
if (user!=admin && in_array($current_action... //etc.
$this->forbiddenAction();
}
etc.
In the constructor we don't know the (current) request the controller might (later) handle, so we don't know the action_name.
skipFilter actually removes the filter from the chain. So it could be called remove*Filter. You're free to implement a 'rewrite*Filter' of course. ;-)
1 to 4 of 4