瀏覽代碼

[Producer] Correctif accès utilisateur connecté

refactoring
Guillaume 1 年之前
父節點
當前提交
17ac62c5da
共有 1 個檔案被更改,包括 17 行新增1 行删除
  1. +17
    -1
      producer/controllers/OrderController.php

+ 17
- 1
producer/controllers/OrderController.php 查看文件

@@ -53,6 +53,7 @@ use common\logic\User\User\Model\User;
use DateTime;
use yii\base\UserException;
use yii\data\ActiveDataProvider;
use yii\filters\AccessControl;
use yii\web\NotFoundHttpException;

class OrderController extends ProducerBaseController
@@ -61,7 +62,22 @@ class OrderController extends ProducerBaseController

public function behaviors()
{
return [];
return [
'access' => [
'class' => AccessControl::class,
'only' => [
'history',
'remove-producer',
'cancel'
],
'rules' => [
[
'allow' => true,
'roles' => ['@']
]
],
],
];
}

public function actionOrder(int $id = 0, $date = '')

Loading…
取消
儲存