public function filters()
{
return array(
'accessControl', // perform access control for CRUD operations
);
}
/**
* Specifies the access control rules.
* This method is used by the 'accessControl' filter.
* @return array access control rules
*/
public function accessRules()
{
return array(
array('allow', // allow authenticated users to access all actions
'users'=>array('@'),
),
array('deny', // deny all users
'users'=>array('*'),
),
);
}
public function filters()
{
return array(
'rights',
);
}
/**
* @return array action filters
*/
public function filters()
{
return array(
'updateOwn + update', // Apply this filter only for the update action.
'rights',
);
}
/**
* Filter method for checking whether the currently logged in user
* is the author of the post being accessed.
*/
public function filterUpdateOwn($filterChain)
{
$post=$this->loadModel();
// Remove the 'rights' filter if the user is updating an own post
// and has the permission to do so.
if(Yii::app()->user->checkAccess('PostUpdateOwn', array('userid'=>$post->author_id)))
$filterChain->removeAt(1);
$filterChain->run();
}
public function allowedActions()
{
return 'autocomplate,autocomplate2';
}
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有