shish 4 лет назад
Родитель
Сommit
abffca761d
1 измененных файлов с 6 добавлено и 0 удалено
  1. 6 0
      app-hd/controllers/ShopAdminController.php

+ 6 - 0
app-hd/controllers/ShopAdminController.php

@@ -195,6 +195,12 @@ class ShopAdminController extends BaseController
         $remind = $post['remind'] ?? 0;
         $status = $post['status'] ?? 1;
         $super = $post['super'] ?? 0;
+
+        $founder = $relation->founder ?? 1;
+        if ($founder == 2 && $super == 0) {
+            util::fail('不能关闭超管权限');
+        }
+
         $relation->roleId = $roleId;
         $relation->remind = $remind;
         $relation->status = $status;