diff --git a/includes/user/permissions.php b/includes/user/permissions.php index 9413cf103..6bbaac21b 100644 --- a/includes/user/permissions.php +++ b/includes/user/permissions.php @@ -84,7 +84,7 @@ function formElementPerm($userInfos){ */ function checkModeEdition($loginVu){ $isAuthorized = FALSE; - $authorizedUsers = array('ylenaour', 'jmartory', 'mheitz', 'mpurcarin', 'mcochet', 'aegasse', 'mricois'); + $authorizedUsers = array('ylenaour', 'jmartory', 'mheitz', 'mpurcarin', 'mcochet', 'aegasse', 'mricois', 'adebbagh'); $isUserAuthorized = FALSE; foreach($authorizedUsers as $login){ if($_SESSION['tabInfo']['login']==$login){ @@ -92,7 +92,7 @@ function checkModeEdition($loginVu){ break; } } - if($loginVu==$_SESSION['tabInfo']['login'] && $isUserAuthorized){ + if($loginVu==$_SESSION['tabInfo']['login'] && $isUserAuthorized || ($_SESSION['tabInfo']['idClient']==1 && $_SESSION['tabInfo']['profil']=='Administrateur') ){ $isAuthorized = TRUE; } return $isAuthorized;