Răsfoiți Sursa

管理员才能修改

shish 4 ani în urmă
părinte
comite
4d28ae789d
1 a modificat fișierele cu 5 adăugiri și 0 ștergeri
  1. 5 0
      app-ghs/controllers/CustomLevelController.php

+ 5 - 0
app-ghs/controllers/CustomLevelController.php

@@ -35,6 +35,11 @@ class CustomLevelController extends BaseController
     //添加修改等级 shish 20211016
     //添加修改等级 shish 20211016
     public function actionReplace()
     public function actionReplace()
     {
     {
+        $shopAdmin = $this->shopAdmin;
+        if (isset($shopAdmin->super) == false || $shopAdmin->super != 1) {
+            util::fail('管理员才能操作');
+        }
+
         $post = Yii::$app->request->post();
         $post = Yii::$app->request->post();
         $info = CustomLevelClass::getByCondition(['shopId' => $this->shopId], true);
         $info = CustomLevelClass::getByCondition(['shopId' => $this->shopId], true);
         if (empty($info)) {
         if (empty($info)) {