Browse Source

pc端,角色组

lizhen_gitee 7 months ago
parent
commit
2dff4c786a

+ 2 - 2
application/common/library/Authcompany.php

@@ -413,8 +413,8 @@ class Authcompany extends \fast\Authpc
     //绝对不允许*管理员
     public function isSuperAdmin()
     {
-        return false;
-//        return in_array('*', $this->getRuleIds()) ? true : false;
+//        return false;
+        return in_array('*', $this->getRuleIds()) ? true : false;
     }
 
     /**

+ 3 - 3
application/company/controller/auth/Group.php

@@ -266,8 +266,8 @@ class Group extends Apic
         $this->loadlang('auth/group');
 
         $model = model('AuthGroup');
-        $id = $this->request->post("id");
-        $pid = $this->request->post("pid");
+        $id = input('id');
+        $pid = input('pid');
         $parentGroupModel = $model->get($pid);
         $currentGroupModel = null;
         if ($id) {
@@ -325,7 +325,7 @@ class Group extends Apic
                     $state = array('selected' => in_array($v['id'], $currentRuleIds) && !in_array($v['id'], $hasChildrens));
                     $nodeList[] = array('id' => $v['id'], 'parent' => $v['pid'] ? $v['pid'] : '#', 'text' => __($v['title']), 'type' => 'menu', 'state' => $state);
                 }
-                $this->success('', null, $nodeList);
+                $this->success(1, $nodeList);
             } else {
                 $this->error(__('Can not change the parent to child'));
             }