Add BackendController/AccesControl
Add the BackendController for all the backend controllers. Add AccesControl
This commit is contained in:
@@ -13,31 +13,8 @@ use common\models\Account;
|
||||
/**
|
||||
* TicketTypeController implements the CRUD actions for TicketType model.
|
||||
*/
|
||||
class TicketTypeController extends Controller
|
||||
class TicketTypeController extends \backend\controllers\BackendController
|
||||
{
|
||||
public function behaviors()
|
||||
{
|
||||
return [
|
||||
'verbs' => [
|
||||
'class' => VerbFilter::className(),
|
||||
'actions' => [
|
||||
'delete' => ['post'],
|
||||
],
|
||||
],
|
||||
'access' => [
|
||||
'class' => \yii\filters\AccessControl::className(),
|
||||
'only' => [ 'index','view','create','update'],
|
||||
'rules' => [
|
||||
// allow authenticated users
|
||||
[
|
||||
'allow' => true,
|
||||
'roles' => ['@'],
|
||||
],
|
||||
// everything else is denied
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists all TicketType models.
|
||||
|
||||
Reference in New Issue
Block a user