fitness-web/backend/controllers/BackendController.php
rocho ed1e0b6c2a Add BackendController/AccesControl
Add the BackendController for all the backend controllers.
Add AccesControl
2015-11-02 17:27:47 +01:00

41 lines
837 B
PHP

<?php
namespace backend\controllers;
use Yii;
use common\models\City;
use backend\models\CitySearch;
use yii\web\Controller;
use yii\web\NotFoundHttpException;
use yii\filters\VerbFilter;
use yii\base\Object;
use yii\db\Query;
use yii\helpers\Json;
/**
* CityController implements the CRUD actions for City model.
*/
class BackendController extends Controller
{
public function behaviors()
{
return [
'access' => [
'class' => \yii\filters\AccessControl::className(),
'rules' => [
// allow authenticated users
[
'actions' => ['create','index','view','update'],
'allow' => true,
'roles' => ['@'],
],
// everything else is denied
],
],
];
}
}