chg: [galaxyClusterRelations] Display org and orgc

pull/6120/head
mokaddem 2020-09-23 17:46:43 +02:00
parent c5fec3c9bb
commit 624d8f820a
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
2 changed files with 23 additions and 1 deletions

View File

@ -66,7 +66,7 @@ class GalaxyClusterRelationsController extends AppController
$this->paginate['conditions']['AND'][] = $contextConditions;
$this->paginate['conditions']['AND'][] = $searchConditions;
$this->paginate['conditions']['AND'][] = $aclConditions;
$this->paginate['contain'] = array('SharingGroup', 'SourceCluster', 'TargetCluster', 'GalaxyClusterRelationTag' => array('Tag'));
$this->paginate['contain'] = array('SharingGroup', 'SourceCluster' => ['Org', 'Orgc'], 'TargetCluster', 'GalaxyClusterRelationTag' => array('Tag'));
$relations = $this->paginate();
$relations = $this->GalaxyClusterRelation->removeNonAccessibleTargetCluster($this->Auth->user(), $relations);
$this->loadModel('SharingGroup');

View File

@ -80,6 +80,28 @@
'searchScope' => 'taxonomy'
)
),
array(
'name' => __('Owner Org'),
'class' => 'short',
'element' => 'org',
'data_path' => 'SourceCluster.Org',
'fields' => array(
'allow_picture' => true,
'default_org' => 'MISP'
),
'requirement' => $isSiteAdmin || (Configure::read('MISP.showorgalternate') && Configure::read('MISP.showorg'))
),
array(
'name' => __('Creator Org'),
'class' => 'short',
'element' => 'org',
'data_path' => 'SourceCluster.Orgc',
'fields' => array(
'allow_picture' => true,
'default_org' => 'MISP'
),
'requirement' => (Configure::read('MISP.showorg') || $isAdmin) || (Configure::read('MISP.showorgalternate') && Configure::read('MISP.showorg'))
),
array(
'name' => __('Distribution'),
'sort' => 'distribution',