示例#1
0
 public function getSlaveIdsByPath($filePath)
 {
     $slaveIds = array();
     $users = MiniUserPrivilege::getInstance()->getPrivilegeList($filePath);
     $fileItem = explode('/', $filePath);
     $slaveIds[] = $fileItem[1];
     if (count($users) > 0) {
         foreach ($users as $user) {
             $slaveIds[] = $user['user_id'];
         }
     }
     $groups = MiniGroupPrivilege::getInstance()->getPrivilegeList($filePath);
     $departmentPrivilege = new DepartmentPermissionBiz();
     foreach ($groups as $group) {
         $departmentPrivilege->getUserByDepartmentId($group['group_id']);
     }
     $ids = array_unique(array_merge($departmentPrivilege->ids, $slaveIds));
     $userIds = array();
     foreach ($ids as $id) {
         if ($id != $this->user['id']) {
             $userIds[$id] = $id;
         }
     }
     return $userIds;
 }