示例#1
0
 public function behaviors()
 {
     return ArrayHelper::merge(parent::behaviors(), ['access' => ['class' => AccessControl::className(), 'only' => ['index'], 'rules' => [['allow' => true, 'roles' => ['index-admin']]]]]);
 }
示例#2
0
 public function behaviors()
 {
     return ArrayHelper::merge(parent::behaviors(), ['access' => ['class' => AccessControl::className(), 'rules' => [['actions' => ['index'], 'allow' => true, 'roles' => ['themes-admin-index']], ['actions' => ['update'], 'allow' => true, 'roles' => ['themes-admin-update']], ['actions' => ['delete'], 'allow' => true, 'roles' => ['themes-admin-delete']], ['actions' => ['upload'], 'allow' => true, 'roles' => ['themes-admin-upload']], ['actions' => ['copy'], 'allow' => true, 'roles' => ['themes-admin-copy']]]]]);
 }
示例#3
0
 public function behaviors()
 {
     return ArrayHelper::merge(parent::behaviors(), ['access' => ['class' => AccessControl::className(), 'rules' => [['actions' => ['index', 'select2-list'], 'allow' => true, 'roles' => ['logger-admin-index']], ['actions' => ['view'], 'allow' => true, 'roles' => ['logger-admin-view']], ['actions' => ['delete'], 'allow' => true, 'roles' => ['logger-admin-delete']]]]]);
 }