mirror of https://github.com/MISP/MISP
fix: [clusterRelation] Added entry in ACLComponent and improved rest error
messagepull/6120/head
parent
6e850f9455
commit
a0e2e96b8f
|
@ -262,6 +262,7 @@ class ACLComponent extends Component
|
|||
'delete' => array('perm_galaxy_editor'),
|
||||
'edit' => array('perm_galaxy_editor'),
|
||||
'index' => array('*'),
|
||||
'view' => array('*'),
|
||||
'fetchClustersFromRelation' => array('*'),
|
||||
),
|
||||
'galaxyElements' => array(
|
||||
|
|
|
@ -238,7 +238,7 @@ class GalaxyClusterRelationsController extends AppController
|
|||
if (empty($errors)) {
|
||||
return $this->RestResponse->saveSuccessResponse('GalaxyClusterRelation', 'edit', $this->response->type(), $message);
|
||||
} else {
|
||||
return $this->RestResponse->saveFailResponse('GalaxyClusterRelation', 'edit', $message, $this->response->type());
|
||||
return $this->RestResponse->saveFailResponse('GalaxyClusterRelation', 'edit', false, $message, $this->response->type());
|
||||
}if (isset($relation['GalaxyClusterRelation']['distribution']) && $relation['GalaxyClusterRelation']['distribution'] == 4 && !$this->SharingGroup->checkIfAuthorised($user, $relation['GalaxyClusterRelation']['sharing_group_id'])) {
|
||||
$errors[] = array(__('Galaxy Cluster Relation could not be saved: The user has to have access to the sharing group in order to be able to edit it.'));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue