fix: [galaxy:update] Make sure the fake user has the perm_sync right

pull/6120/head
mokaddem 2020-11-18 09:36:57 +01:00
parent 89f307bd07
commit 42d3f92c9f
2 changed files with 2 additions and 2 deletions

View File

@ -154,7 +154,7 @@ class Galaxy extends AppModel
$this->GalaxyCluster->delete($cluster_ids_to_delete, false, false);
}
$tempUser = array('Role' => array('perm_galaxy_editor' => 1, 'perm_tag_editor' => 1, 'perm_site_admin' => 1)); // only site-admin are authorized to update galaxies
$tempUser = array('Role' => array('perm_galaxy_editor' => 1, 'perm_tag_editor' => 1, 'perm_site_admin' => 1, 'perm_sync' => 1)); // only site-admin are authorized to update galaxies
// create all clusters
foreach ($cluster_package['values'] as $cluster) {
if (empty($cluster['version'])) {

View File

@ -157,7 +157,7 @@ class SharingGroup extends AppModel
$fieldsOrg = array('id', 'name', 'uuid');
$fieldsServer = array('id', 'url', 'name');
$fields = array();
$permissionTree = ($user['Role']['perm_sync'] || $user['Role']['perm_site_admin']) ? 1 : 0;
$permissionTree = ($user['Role']['perm_site_admin'] || $user['Role']['perm_sync']) ? 1 : 0;
$fieldsSharingGroup = array(
array(
'fields' => array(