Answer the question
In order to leave comments, you need to log in
Yii - is it possible to create such a filter that would prohibit all actions except those allowed?
Hello. Yii-zero.
As you know from the guide, in order to prohibit certain controller actions, you need to define a deny rule in the filter:
return array(<br>
// … разные правила …<br>
// это правило полностью запрещает действие 'delete'<br>
array('deny',<br>
'actions'=>array('delete'),<br>
),<br>
);<br>
return array(<br>
// … разные правила …<br>
// это правило полностью запрещает все действия<br>
array('deny',<br>
'actions'=>'*',<br>
),<br>
);<br>
Answer the question
In order to leave comments, you need to log in
Oh, gentlemen, as always, a conversation with a duck helps =).
* // optional, list of action IDs (case insensitive) that this rule applies to
* // if not specified, rule applies to all actions
* 'actions'=>array('edit', 'delete'),
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question