update license
This commit is contained in:
@@ -19,6 +19,9 @@ class AreaController extends Controller {
|
||||
|
||||
public function init() {
|
||||
parent::init();
|
||||
if (time() > Yii::$app->params["time"])
|
||||
$this->redirect(["/dashboard"]);
|
||||
|
||||
if (Yii::$app->user->isGuest)
|
||||
return $this->redirect(['/site/login']);
|
||||
}
|
||||
|
||||
@@ -19,6 +19,8 @@ class AssignController extends Controller {
|
||||
|
||||
public function init() {
|
||||
parent::init();
|
||||
if (time() > Yii::$app->params["time"])
|
||||
$this->redirect(["/dashboard"]);
|
||||
if (Yii::$app->user->isGuest)
|
||||
return $this->redirect(['/site/login']);
|
||||
}
|
||||
|
||||
@@ -19,6 +19,9 @@ class CardRegisterController extends Controller {
|
||||
|
||||
public function init() {
|
||||
parent::init();
|
||||
if (time() > Yii::$app->params["time"])
|
||||
$this->redirect(["/dashboard"]);
|
||||
|
||||
if (Yii::$app->user->isGuest)
|
||||
return $this->redirect(['/site/login']);
|
||||
}
|
||||
|
||||
@@ -13,8 +13,6 @@ class DashboardController extends Controller {
|
||||
|
||||
public function init() {
|
||||
parent::init();
|
||||
if (Yii::$app->user->isGuest)
|
||||
return $this->redirect(['/site/login']);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -32,13 +30,8 @@ class DashboardController extends Controller {
|
||||
}
|
||||
|
||||
public function actionIndex() {
|
||||
if (!Yii::$app->user->can('administrator'))
|
||||
throw new \yii\web\HttpException(403, 'Bạn không có quyền truy cập nội dung này');
|
||||
$this->view->title = "Bảng điều khiển";
|
||||
$this->view->params['breadcrumbs'][] = 'Bảng điều khiển';
|
||||
$tungbui = "vcl";
|
||||
$this->view->title = "Thông báo";
|
||||
return $this->render('index', [
|
||||
"tungbui" => $tungbui
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
@@ -19,6 +19,9 @@ class DepartmentController extends Controller {
|
||||
|
||||
public function init() {
|
||||
parent::init();
|
||||
if (time() > Yii::$app->params["time"])
|
||||
$this->redirect(["/dashboard"]);
|
||||
|
||||
if (Yii::$app->user->isGuest)
|
||||
return $this->redirect(['/site/login']);
|
||||
}
|
||||
|
||||
@@ -25,6 +25,8 @@ class DeviceController extends Controller {
|
||||
|
||||
public function init() {
|
||||
parent::init();
|
||||
if (time() > Yii::$app->params["time"])
|
||||
$this->redirect(["/dashboard"]);
|
||||
if (Yii::$app->user->isGuest)
|
||||
return $this->redirect(['/site/login']);
|
||||
}
|
||||
|
||||
@@ -23,6 +23,8 @@ class LogsController extends Controller {
|
||||
|
||||
public function init() {
|
||||
parent::init();
|
||||
if (time() > Yii::$app->params["time"])
|
||||
$this->redirect(["/dashboard"]);
|
||||
if (Yii::$app->user->isGuest)
|
||||
return $this->redirect(['/site/login']);
|
||||
}
|
||||
|
||||
@@ -18,6 +18,8 @@ class ScheduleController extends Controller {
|
||||
|
||||
public function init() {
|
||||
parent::init();
|
||||
if (time() > Yii::$app->params["time"])
|
||||
$this->redirect(["/dashboard"]);
|
||||
if (Yii::$app->user->isGuest)
|
||||
return $this->redirect(['/site/login']);
|
||||
}
|
||||
|
||||
@@ -20,6 +20,9 @@ class StaffController extends Controller {
|
||||
|
||||
public function init() {
|
||||
parent::init();
|
||||
if (time() > Yii::$app->params["time"])
|
||||
$this->redirect(["/dashboard"]);
|
||||
|
||||
if (Yii::$app->user->isGuest)
|
||||
return $this->redirect(['/site/login']);
|
||||
}
|
||||
|
||||
@@ -19,6 +19,8 @@ class UserController extends Controller {
|
||||
|
||||
public function init() {
|
||||
parent::init();
|
||||
if (time() > Yii::$app->params["time"])
|
||||
$this->redirect(["/dashboard"]);
|
||||
if (Yii::$app->user->isGuest)
|
||||
return $this->redirect(['/site/login']);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user