From 2cf8f5e7ec97eee3bc2f088f2120b2e81a8a32ff Mon Sep 17 00:00:00 2001 From: stephan Date: Tue, 23 Jun 2026 14:19:57 -0400 Subject: [PATCH] restructurer les acces --- compte.php | 3 ++- inc_tableau_gestion_epreuves.php | 3 ++- inc_tableau_promoteur.php | 7 +++++-- php/inc_fx_eve_acces.php | 35 -------------------------------- php/inc_fx_promoteur.php | 3 ++- 5 files changed, 11 insertions(+), 40 deletions(-) diff --git a/compte.php b/compte.php index 5ccfbb1..db684e3 100644 --- a/compte.php +++ b/compte.php @@ -316,7 +316,8 @@ if (isset($_GET['promoteur_eve_id'])) { exit; } } elseif ($strCode === 'compte_inc_tableau_gestion_epreuves') { - if (!fxEveAccesCanManageBibV4($_SESSION['com_id'] ?? 0, $intEveIdbase)) { + if (empty($_SESSION['usa_id']) + && !fxEveAccesHasAnyPermission($_SESSION['com_id'] ?? 0, $intEveIdbase, array('dossards.manage', 'epreuves.edit_qte'))) { header('Location: ' . $vDomaine . '/' . $strPage); exit; } diff --git a/inc_tableau_gestion_epreuves.php b/inc_tableau_gestion_epreuves.php index b45c033..935f2d7 100644 --- a/inc_tableau_gestion_epreuves.php +++ b/inc_tableau_gestion_epreuves.php @@ -29,7 +29,8 @@ if (isset($_GET['promoteur_eve_id'])) { } if ($intEveId <= 0 || (empty($_SESSION['com_id']) && empty($_SESSION['usa_id'])) - || !fxEveAccesCanManageBibV4($_SESSION['com_id'] ?? 0, $intEveId)) { + || (empty($_SESSION['usa_id']) + && !fxEveAccesHasAnyPermission($_SESSION['com_id'] ?? 0, $intEveId, array('dossards.manage', 'epreuves.edit_qte')))) { $strRedirect = $vDomaine . '/compte/inc_tableau_promoteur'; if (!empty($_GET['promoteur_eve_id'])) { $strRedirect .= '?promoteur_eve_id=' . urlencode($_GET['promoteur_eve_id']); diff --git a/inc_tableau_promoteur.php b/inc_tableau_promoteur.php index d64b04a..bda6996 100644 --- a/inc_tableau_promoteur.php +++ b/inc_tableau_promoteur.php @@ -234,7 +234,9 @@ if ($intEveId != 0) { + if (!empty($_SESSION['usa_id']) + || fxEveAccesHasAnyPermission($_SESSION['com_id'] ?? 0, $intEveId, array('dossards.manage', 'epreuves.edit_qte'))) { + ?> - false, 'message' => fxBibMsg('bib_v4_ajax_unauthorized'),