| @@ 31-59 (lines=29) @@ | ||
| 28 | /** |
|
| 29 | * @inheritdoc |
|
| 30 | */ |
|
| 31 | public function behaviors() |
|
| 32 | { |
|
| 33 | return [ |
|
| 34 | 'access' => [ |
|
| 35 | 'class' => AccessControl::className(), |
|
| 36 | 'rules' => [ |
|
| 37 | [ |
|
| 38 | 'actions' => ['ajax-create-hierarchical', 'ajax-create-non-hierarchical', 'bulk-action'], |
|
| 39 | 'allow' => true, |
|
| 40 | 'roles' => ['editor'], |
|
| 41 | ], |
|
| 42 | [ |
|
| 43 | 'actions' => ['ajax-search'], |
|
| 44 | 'allow' => true, |
|
| 45 | 'roles' => ['subscriber'], |
|
| 46 | ], |
|
| 47 | ], |
|
| 48 | ], |
|
| 49 | 'verbs' => [ |
|
| 50 | 'class' => VerbFilter::className(), |
|
| 51 | 'actions' => [ |
|
| 52 | 'ajax-create-hierarchical' => ['post'], |
|
| 53 | 'ajax-create-non-hierarchical' => ['post'], |
|
| 54 | 'bulk-action' => ['post'], |
|
| 55 | 'ajax-search' => ['post'], |
|
| 56 | ], |
|
| 57 | ], |
|
| 58 | ]; |
|
| 59 | } |
|
| 60 | ||
| 61 | /** |
|
| 62 | * Create a new Term model for hierarchical Taxonomy through AJAX request. |
|
| @@ 30-56 (lines=27) @@ | ||
| 27 | /** |
|
| 28 | * @inheritdoc |
|
| 29 | */ |
|
| 30 | public function behaviors() |
|
| 31 | { |
|
| 32 | return [ |
|
| 33 | 'access' => [ |
|
| 34 | 'class' => AccessControl::className(), |
|
| 35 | 'rules' => [ |
|
| 36 | [ |
|
| 37 | 'actions' => ['index', 'create', 'update', 'delete', 'bulk-action'], |
|
| 38 | 'allow' => true, |
|
| 39 | 'roles' => ['administrator'], |
|
| 40 | ], |
|
| 41 | [ |
|
| 42 | 'actions' => ['profile', 'view', 'reset-password'], |
|
| 43 | 'allow' => true, |
|
| 44 | 'roles' => ['@'], |
|
| 45 | ], |
|
| 46 | ], |
|
| 47 | ], |
|
| 48 | 'verbs' => [ |
|
| 49 | 'class' => VerbFilter::className(), |
|
| 50 | 'actions' => [ |
|
| 51 | 'delete' => ['post'], |
|
| 52 | 'bulk-action' => ['post'], |
|
| 53 | ], |
|
| 54 | ], |
|
| 55 | ]; |
|
| 56 | } |
|
| 57 | ||
| 58 | /** |
|
| 59 | * Lists all User models. |
|