mirror of https://github.com/MISP/MISP
fix: [sync] Fixed a critical issue causing sharing groups to lose orgs/instance information on sync when using non sync users on a pull
parent
044ddb33e3
commit
add5882d8b
|
@ -153,7 +153,6 @@ class SharingGroup extends AppModel
|
||||||
} else {
|
} else {
|
||||||
return array();
|
return array();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($scope === 'full') {
|
if ($scope === 'full') {
|
||||||
$sgs = $this->find('all', array(
|
$sgs = $this->find('all', array(
|
||||||
'contain' => array('SharingGroupServer' => array('Server'), 'SharingGroupOrg' => array('Organisation'), 'Organisation'),
|
'contain' => array('SharingGroupServer' => array('Server'), 'SharingGroupOrg' => array('Organisation'), 'Organisation'),
|
||||||
|
@ -164,7 +163,9 @@ class SharingGroup extends AppModel
|
||||||
} elseif ($scope === 'simplified') {
|
} elseif ($scope === 'simplified') {
|
||||||
$fieldsOrg = array('id', 'name', 'uuid');
|
$fieldsOrg = array('id', 'name', 'uuid');
|
||||||
$fieldsServer = array('id', 'url', 'name');
|
$fieldsServer = array('id', 'url', 'name');
|
||||||
$permissionTree = ($user['Role']['perm_site_admin'] || $user['Role']['perm_sync']) ? 1 : 0;
|
//$permissionTree = ($user['Role']['perm_site_admin'] || $user['Role']['perm_sync']) ? 1 : 0;
|
||||||
|
//Temporary fix: read only users used for pulling were stripping organisation data from sharing groups
|
||||||
|
$permissionTree = 1;
|
||||||
$fieldsSharingGroup = array(
|
$fieldsSharingGroup = array(
|
||||||
array(
|
array(
|
||||||
'fields' => array(
|
'fields' => array(
|
||||||
|
|
Loading…
Reference in New Issue