Explorar el Código

不能关闭超管权限

shish hace 4 años
padre
commit
4c3a7cf9a8
Se han modificado 1 ficheros con 5 adiciones y 0 borrados
  1. 5 0
      app-ghs/controllers/ShopAdminController.php

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

@@ -211,6 +211,11 @@ class ShopAdminController extends BaseController
         }
         $relation->save();
 
+        $founder = $relation->founder ?? 1;
+        if ($founder == 2 && $super == 1) {
+            util::fail('不能关闭超管权限');
+        }
+
         //若有传密码,则修改密码
         $password = $post['password'] ?? '';
         if (!empty($password)) {