Browse Source

feat:修改site控制器,方便通过权限获取方法获取权限

antshop
linyaostalker 5 years ago
parent
commit
9f8961870d
  1. 12
      backend/controllers/SiteController.php

12
backend/controllers/SiteController.php

@ -2,6 +2,7 @@
namespace backend\controllers; namespace backend\controllers;
use backend\logic\PermissionManager;
use Yii; use Yii;
use yii\web\Controller; use yii\web\Controller;
use yii\filters\VerbFilter; use yii\filters\VerbFilter;
@ -11,6 +12,7 @@ use backend\models\CategorySearch;
/** /**
* Site controller * Site controller
* DESCRIBE 网站基本权限 DESCRIBE
*/ */
class SiteController extends Controller { class SiteController extends Controller {
@ -69,6 +71,7 @@ class SiteController extends Controller {
* Login action. * Login action.
* *
* @return string * @return string
* ACTION 登录 ACTION
*/ */
public function actionLogin() { public function actionLogin() {
@ -94,6 +97,7 @@ class SiteController extends Controller {
* Logout action. * Logout action.
* *
* @return string * @return string
* ACTION 登出 ACTION
*/ */
public function actionLogout() { public function actionLogout() {
Yii::$app->user->logout(); Yii::$app->user->logout();
@ -101,12 +105,4 @@ class SiteController extends Controller {
return $this->goHome(); return $this->goHome();
} }
public function actionTest() {
$searchModel = new CategorySearch();
return $this->render('test', [
'name' => 'blobt',
'model' => $searchModel
]);
}
} }
Loading…
Cancel
Save