diff --git a/CHANGELOG b/CHANGELOG index 74204387f..13fd41306 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,8 @@ +-------------------------------------------------------------------------------- + Changes in version 6.0.13 +-------------------------------------------------------------------------------- +- merge changes up to 5.1.20 + -------------------------------------------------------------------------------- Changes in version 6.0.12 -------------------------------------------------------------------------------- @@ -164,6 +169,11 @@ - add document list which can be exported as an archive - search results can be exported +-------------------------------------------------------------------------------- + Changes in version 5.1.20 +-------------------------------------------------------------------------------- +- fix import of users + -------------------------------------------------------------------------------- Changes in version 5.1.19 -------------------------------------------------------------------------------- @@ -191,6 +201,7 @@ - add new attribute types 'document', 'folder', 'user', 'group' - overhaul of folder tree which can now be used more than once on a page - fix search of values in attributes of document content +- fulltext search finds only documents for which the logged in user has read access -------------------------------------------------------------------------------- Changes in version 5.1.18 diff --git a/SeedDMS_Core/Core/inc.ClassDMS.php b/SeedDMS_Core/Core/inc.ClassDMS.php index d55540437..172de7302 100644 --- a/SeedDMS_Core/Core/inc.ClassDMS.php +++ b/SeedDMS_Core/Core/inc.ClassDMS.php @@ -472,7 +472,7 @@ class SeedDMS_Core_DMS { $this->lasterror = ''; $this->version = '@package_version@'; if($this->version[0] == '@') - $this->version = '6.0.12'; + $this->version = '6.0.13'; } /* }}} */ /** diff --git a/SeedDMS_Core/package.xml b/SeedDMS_Core/package.xml index 2db2e696a..be24679e3 100644 --- a/SeedDMS_Core/package.xml +++ b/SeedDMS_Core/package.xml @@ -12,11 +12,11 @@ uwe@steinmann.cx yes - 2020-06-05 + 2020-09-03 - 6.0.12 - 6.0.12 + 6.0.13 + 6.0.13 stable @@ -24,10 +24,6 @@ GPL License -- add method SeedDMS_Core_Document::setParent() as an alias for setFolder() -- clear the save content list and latest content in SeedDMS_Core_Document after - a version has been deleted. -- new method SeedDMS_Core_Document::isLatestVersion() @@ -2059,5 +2055,20 @@ SeedDMS_Core_DocumentContent::delRevisor() returns -4 if user has already made a SeedDMS_Core_DMS::filterAccess() properly checks for documents + + 2020-06-05 + + + 6.0.12 + 6.0.12 + + + stable + stable + + GPL License + + + diff --git a/inc/inc.Version.php b/inc/inc.Version.php index 23545fbef..4c965d317 100644 --- a/inc/inc.Version.php +++ b/inc/inc.Version.php @@ -20,7 +20,7 @@ class SeedDMS_Version { /* {{{ */ - const _number = "6.0.12"; + const _number = "6.0.13"; const _string = "SeedDMS"; function __construct() { diff --git a/op/op.ImportUsers.php b/op/op.ImportUsers.php index c2c1e94de..b5f39128a 100644 --- a/op/op.ImportUsers.php +++ b/op/op.ImportUsers.php @@ -70,12 +70,17 @@ function renderFolderData($colname, $objdata) { /* {{{ */ function getGroupData($colname, $coldata, $objdata) { /* {{{ */ global $dms; + $kk = explode('_', $colname); + if(count($kk) == 2) + $gn = $kk[1]; + else + $gn = '1'; if(!isset($objdata['groups'])) $objdata['groups'] = []; if($group = $dms->getGroupByName($coldata)) { - $objdata['groups'][] = $group; + $objdata['groups'][$gn] = $group; } else { - $objdata['groups'] = []; + $objdata['groups'][$gn] = null; $objdata['__logs__'][] = array('type'=>'error', 'msg'=> "No such group with name '".$coldata."'"); } return $objdata; @@ -83,8 +88,13 @@ function getGroupData($colname, $coldata, $objdata) { /* {{{ */ function renderGroupData($colname, $objdata) { /* {{{ */ $html = ''; - foreach($objdata[$colname] as $g) - $html .= $g->getName().';'; + $kk = explode('_', $colname); + if(count($kk) == 2) + $gn = $kk[1]; + else + $gn = '1'; + if($objdata['groups'][$gn]) + $html .= $objdata['groups'][$gn]->getName(); return $html; } /* }}} */ @@ -127,6 +137,7 @@ if (isset($_FILES['userdata']) && $_FILES['userdata']['error'] == 0) { $csvdelim = ';'; $csvencl = '"'; + $colmap = array(); if($fp = fopen($_FILES['userdata']['tmp_name'], 'r')) { /* First of all build up a column map, which contains for each columen * the column name @@ -138,7 +149,6 @@ if (isset($_FILES['userdata']) && $_FILES['userdata']['error'] == 0) { * Unknown columns will be skipped and the index in the column map will * be left out. */ - $colmap = array(); if($csvheader = fgetcsv($fp, 0, $csvdelim, $csvencl)) { foreach($csvheader as $i=>$colname) { $colname = trim($colname); @@ -245,10 +255,14 @@ if (isset($_FILES['userdata']) && $_FILES['userdata']['error'] == 0) { } else { if(!empty($u['login']) && !empty($u['name']) && !empty($u['email'])) { if(!empty($_POST['addnew'])) { - $ret = $dms->addUser($u['login'], '', $u['name'], $u['email'], !empty($u['language']) ? $u['language'] : 'en_GB', 'bootstrap', !empty($u['comment']) ? $u['comment'] : '', $u['role']); - if($ret) + $ret = $dms->addUser($u['login'], !empty($u['passenc']) ? $u['passenc'] : '', $u['name'], $u['email'], !empty($u['language']) ? $u['language'] : 'en_GB', 'bootstrap', !empty($u['comment']) ? $u['comment'] : '', $u['role']); + if($ret) { $log[$uhash][] = array('id'=>$u['login'], 'type'=>'success', 'msg'=> "User '".$u['name']."' added."); - else + foreach($u['groups'] as $g) { + if($g) + $ret->joinGroup($g); + } + } else $log[$uhash][] = array('id'=>$u['login'], 'type'=>'error', 'msg'=> "User '".$u['name']."' could not be added."); } else { // $log[$uhash][] = array('id'=>$u['login'], 'type'=>'success', 'msg'=> "User '".$u['name']."' can be added.");