From 6cf01cc799a2c5ae852fe67641b688015cdebf19 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 9 Sep 2024 14:30:52 +0200 Subject: [PATCH] Fix export permission --- htdocs/exports/export.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/exports/export.php b/htdocs/exports/export.php index d45abb66d87..ea3b187f821 100644 --- a/htdocs/exports/export.php +++ b/htdocs/exports/export.php @@ -301,7 +301,7 @@ if ($action == 'builddoc' && $user->hasRight('export', 'lire')) { } // Delete file -if ($step == 5 && $action == 'confirm_deletefile' && $confirm == 'yes' && $user->hasRight('import', 'run')) { +if ($step == 5 && $action == 'confirm_deletefile' && $confirm == 'yes' && $user->hasRight('export', 'run')) { // Check permission if (empty($objexport->array_export_perms[0])) { accessforbidden(); @@ -319,7 +319,7 @@ if ($step == 5 && $action == 'confirm_deletefile' && $confirm == 'yes' && $user- exit; } -if ($action == 'deleteprof' && $user->hasRight('import', 'run')) { +if ($action == 'deleteprof' && $user->hasRight('export', 'run')) { // Check permission if (empty($objexport->array_export_perms[0])) { accessforbidden(); @@ -332,7 +332,7 @@ if ($action == 'deleteprof' && $user->hasRight('import', 'run')) { } // TODO The export for filter is not yet implemented (old code created conflicts with step 2). We must use same way of working and same combo list of predefined export than step 2. -if ($action == 'add_export_model' && $user->hasRight('import', 'run')) { +if ($action == 'add_export_model' && $user->hasRight('export', 'run')) { // Check permission if (empty($objexport->array_export_perms[0])) { accessforbidden(); @@ -383,7 +383,7 @@ if ($action == 'add_export_model' && $user->hasRight('import', 'run')) { } // Reload a predefined export model -if ($step == 2 && $action == 'select_model' && $user->hasRight('import', 'run')) { +if ($step == 2 && $action == 'select_model' && $user->hasRight('export', 'run')) { $_SESSION["export_selected_fields"] = array(); $_SESSION["export_filtered_fields"] = array(); @@ -412,7 +412,7 @@ if ($step == 2 && $action == 'select_model' && $user->hasRight('import', 'run')) } // Get form with filters -if ($step == 4 && $action == 'submitFormField' && $user->hasRight('import', 'run')) { +if ($step == 4 && $action == 'submitFormField' && $user->hasRight('export', 'run')) { // Check permission if (empty($objexport->array_export_perms[0])) { accessforbidden();