From 579cf2c2f358424cf92a2e73924504ed899fc48c Mon Sep 17 00:00:00 2001 From: eldy Date: Mon, 29 Aug 2011 19:24:27 +0200 Subject: [PATCH] Fix: Hide button if no permission --- htdocs/adherents/fiche.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/htdocs/adherents/fiche.php b/htdocs/adherents/fiche.php index a3b9dc5e521..cf2af05b970 100644 --- a/htdocs/adherents/fiche.php +++ b/htdocs/adherents/fiche.php @@ -1341,16 +1341,19 @@ if ($rowid && $action != 'edit') print ''; - if ($_GET['action'] != 'editlogin' && $user->rights->adherent->creer) print ''; + if ($_GET['action'] != 'editlogin' && $user->rights->adherent->creer) + { + print ''; + } print '
'; print $langs->trans("LinkedToDolibarrUser"); print 'id.'">'.img_edit($langs->trans('SetLinkToUser'),1).''; + if ($user->rights->user->user->creer) + { + print 'id.'">'.img_edit($langs->trans('SetLinkToUser'),1).''; + } + print '
'; print ''; if ($_GET['action'] == 'editlogin') { - /*$include=array(); - if (empty($user->rights->user->user->creer)) // If can edit only itself user, we can link to itself only - { - $include=array($adh->user_id,$user->id); - }*/ print $html->form_users($_SERVER['PHP_SELF'].'?rowid='.$adh->id,$adh->user_id,'userid',''); } else