Exemplo n.º 1
0
 /**
  * @inheritdoc
  */
 public function behaviors()
 {
     $behaviors = parent::behaviors();
     $behaviors['access']['rules'] = [['allow' => true, 'actions' => ['index'], 'roles' => ['BViewRules']]];
     $behaviors['access']['rules'][] = ['allow' => true, 'actions' => ['create'], 'roles' => ['BCreateRules']];
     $behaviors['access']['rules'][] = ['allow' => true, 'actions' => ['delete', 'batch-delete'], 'roles' => ['BDeleteRules']];
     $behaviors['verbs'] = ['class' => VerbFilter::className(), 'actions' => ['index' => ['get'], 'create' => ['get', 'post'], 'delete' => ['post', 'delete'], 'batch-delete' => ['post', 'delete']]];
     return $behaviors;
 }
Exemplo n.º 2
0
 /**
  * @inheritdoc
  */
 public function behaviors()
 {
     $behaviors = parent::behaviors();
     $behaviors['access']['rules'] = [['allow' => true, 'actions' => ['index'], 'roles' => ['BViewBlogs']]];
     $behaviors['access']['rules'][] = ['allow' => true, 'actions' => ['create'], 'roles' => ['BCreateBlogs']];
     $behaviors['access']['rules'][] = ['allow' => true, 'actions' => ['update'], 'roles' => ['BUpdateBlogs']];
     $behaviors['access']['rules'][] = ['allow' => true, 'actions' => ['delete', 'batch-delete'], 'roles' => ['BDeleteBlogs']];
     $behaviors['access']['rules'][] = ['allow' => true, 'actions' => ['imperavi-get', 'imperavi-image-upload', 'imperavi-file-upload', 'fileapi-upload'], 'roles' => ['BCreateBlogs', 'BUpdateBlogs']];
     $behaviors['verbs'] = ['class' => VerbFilter::className(), 'actions' => ['index' => ['get'], 'create' => ['get', 'post'], 'update' => ['get', 'put', 'post'], 'delete' => ['post', 'delete'], 'batch-delete' => ['post', 'delete']]];
     return $behaviors;
 }
Exemplo n.º 3
0
 /**
  * @inheritdoc
  */
 public function behaviors()
 {
     $behaviors = parent::behaviors();
     $behaviors['access']['rules'] = [['allow' => true, 'actions' => ['index'], 'roles' => ['BViewCommentsModels']]];
     $behaviors['access']['rules'][] = ['allow' => true, 'actions' => ['create'], 'roles' => ['BCreateCommentsModels']];
     $behaviors['access']['rules'][] = ['allow' => true, 'actions' => ['update'], 'roles' => ['BUpdateCommentsModels']];
     $behaviors['access']['rules'][] = ['allow' => true, 'actions' => ['delete', 'batch-delete'], 'roles' => ['BDeleteCommentsModels']];
     $behaviors['access']['rules'][] = ['allow' => true, 'actions' => ['enable', 'disable'], 'roles' => ['BManageCommentsModule']];
     $behaviors['verbs'] = ['class' => VerbFilter::className(), 'actions' => ['index' => ['get'], 'view' => ['get'], 'create' => ['get', 'post'], 'update' => ['get', 'put', 'post'], 'delete' => ['post', 'delete'], 'batch-delete' => ['post', 'delete'], 'enable' => ['post'], 'disable' => ['post']]];
     return $behaviors;
 }
Exemplo n.º 4
0
 /**
  * @inheritdoc
  */
 public function behaviors()
 {
     $behaviors = parent::behaviors();
     $behaviors['access']['rules'][] = ['allow' => true, 'actions' => ['error'], 'roles' => ['@']];
     return $behaviors;
 }