[英]CakePHP: What's the difference between Auth->allowedActions() and Auth->allow();
What's the difference between Auth->allowedActions() and Auth->allow(); Auth-> allowedActions()和Auth-> allow()之间有什么区别? ?
?
$this->Auth->allowedActions = array('index','view','archive','listarchive','viewfromcategory','tags','aboutme','contact','polls');
Or 要么
$this->Auth->allow(array('index','view','archive','listarchive','viewfromcategory','tags','aboutme','contact','polls'));
use allow() to add more actions to the allowedActions (in addition to those already in there). 使用allow()将更多操作添加到allowedAction(除了已存在的操作之外)。 And the syntax for allow() is
$this->Auth->allow('index','view');
并且allow()的语法是
$this->Auth->allow('index','view');
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.