Fix user pram_ihm, display tab and allow modify button only is user
right allow it is OK
This commit is contained in:
parent
f88e9425ec
commit
7f950d8b45
@ -66,10 +66,13 @@ function user_prepare_head($object)
|
|||||||
$h++;
|
$h++;
|
||||||
}
|
}
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/user/param_ihm.php?id='.$object->id;
|
//Display this tab only if can updte information
|
||||||
$head[$h][1] = $langs->trans("UserGUISetup");
|
if (!empty($user->admin) || !empty($user->rights->user->self->creer)) {
|
||||||
$head[$h][2] = 'guisetup';
|
$head[$h][0] = DOL_URL_ROOT.'/user/param_ihm.php?id='.$object->id;
|
||||||
$h++;
|
$head[$h][1] = $langs->trans("UserGUISetup");
|
||||||
|
$head[$h][2] = 'guisetup';
|
||||||
|
$h++;
|
||||||
|
}
|
||||||
|
|
||||||
if (! empty($conf->clicktodial->enabled))
|
if (! empty($conf->clicktodial->enabled))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -258,7 +258,7 @@ else
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ($user->id == $fuser->id || ! empty($user->admin)) // Si utilisateur edite = utilisateur courant (pas besoin de droits particulier car il s'agit d'une page de modif d'output et non de données) ou si admin
|
if (($user->id == $fuser->id || ! empty($user->admin)) && $caneditfield) // Si utilisateur edite = utilisateur courant (pas besoin de droits particulier car il s'agit d'une page de modif d'output et non de données) ou si admin
|
||||||
{
|
{
|
||||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit&id='.$fuser->id.'">'.$langs->trans("Modify").'</a>';
|
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit&id='.$fuser->id.'">'.$langs->trans("Modify").'</a>';
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user