diff --git a/library/ZendAfi/View/Helper/FonctionsAdmin.php b/library/ZendAfi/View/Helper/FonctionsAdmin.php index dd51c1bdc9042cdb3996923aaefeaa7e4bdd3412..1cc51cdb9f77122664bc779c996de5794c7abdc3 100644 --- a/library/ZendAfi/View/Helper/FonctionsAdmin.php +++ b/library/ZendAfi/View/Helper/FonctionsAdmin.php @@ -28,7 +28,8 @@ class ZendAfi_View_Helper_FonctionsAdmin extends ZendAfi_View_Helper_BaseHelper $_current_skin; public function fonctionsAdmin($id_module = 0, $type_module = false, $division = null, $extended_actions = []) { - $this->id_profil = Class_Profil::getCurrentProfil()->getId(); + $profile = Class_Profil::getCurrentProfil(); + $this->id_profil = $profile->getId(); $this->type_module = $type_module; $this->id_module = $id_module; $this->division = $division; @@ -36,7 +37,7 @@ class ZendAfi_View_Helper_FonctionsAdmin extends ZendAfi_View_Helper_BaseHelper $actions = [$this->_extended($extended_actions)]; - if (Class_Users::isCurrentUserCanConfigFront()) + if (Class_Users::isCurrentUserAllowedToEditProfile($profile)) $actions = array_merge($actions, [$this->_config(), $this->_versions(),