fix: [clusterRelation] Added entry in ACLComponent and improved rest error

message
pull/6120/head
mokaddem 2020-06-15 09:01:47 +02:00
parent 6e850f9455
commit a0e2e96b8f
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
2 changed files with 2 additions and 1 deletions

View File

@ -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(

View File

@ -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.'));
}