From 42d3f92c9f544f9aaafd99d31dce33dc5b4a6996 Mon Sep 17 00:00:00 2001 From: mokaddem Date: Wed, 18 Nov 2020 09:36:57 +0100 Subject: [PATCH] fix: [galaxy:update] Make sure the fake user has the perm_sync right --- app/Model/Galaxy.php | 2 +- app/Model/SharingGroup.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Model/Galaxy.php b/app/Model/Galaxy.php index f337d5539..ea51aabff 100644 --- a/app/Model/Galaxy.php +++ b/app/Model/Galaxy.php @@ -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'])) { diff --git a/app/Model/SharingGroup.php b/app/Model/SharingGroup.php index 5719d1513..81c17fc05 100644 --- a/app/Model/SharingGroup.php +++ b/app/Model/SharingGroup.php @@ -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(