diff --git a/htdocs/user/fiche.php b/htdocs/user/fiche.php
index c84ea8cb314..70c00ee6c15 100644
--- a/htdocs/user/fiche.php
+++ b/htdocs/user/fiche.php
@@ -232,14 +232,13 @@ else
$head[$h][0] = DOL_URL_ROOT.'/user/fiche.php?id='.$fuser->id;
$head[$h][1] = $langs->trans("UserCard");
- if ($_GET["action"] != 'perms') { $hselected=$h; }
+ $hselected=$h;
$h++;
if ($user->admin)
{
- $head[$h][0] = DOL_URL_ROOT.'/user/fiche.php?action=perms&id='.$fuser->id;
+ $head[$h][0] = DOL_URL_ROOT.'/user/perms.php?id='.$fuser->id;
$head[$h][1] = $langs->trans("Permissions");
- if ($_GET["action"] == 'perms') { $hselected=$h; }
$h++;
}
@@ -262,86 +261,7 @@ else
$html->form_confirm("fiche.php?id=$fuser->id",$langs->trans("DisableAUser"),$langs->trans("ConfirmDisableUser",$fuser->login),"confirm_delete");
}
-
-
- if ($_GET["action"] == 'perms')
- {
-
- /*
- * Ecran ajout/suppression permission
- */
- print '
';
-
- // Droits existant
- print "".'';
- print '';
- print '| '.$langs->trans("AvailableRights").' | '.$langs->trans("Module").' |   | ';
- $sql = "SELECT r.id, r.libelle, r.module FROM ".MAIN_DB_PREFIX."rights_def as r ORDER BY r.module, r.id ASC";
-
- if ($db->query($sql))
- {
- $num = $db->num_rows();
- $i = 0;
- $var = True;
- while ($i < $num)
- {
- $obj = $db->fetch_object($i);
- if ($oldmod <> $obj->module)
- {
- $oldmod = $obj->module;
- $var = !$var;
- }
- print '';
- print '| '.$obj->libelle . ' | '.$obj->module . ' | ';
- print ''.img_edit_add().' | ';
- print ' ';
-
- $i++;
- }
- }
- print ' ';
-
- print ' | ';
-
- // Droits possédés
- print '';
- print '|   | '.$langs->trans("OwnedRights").' | '.$langs->trans("Module").' | ';
-
- $sql = "SELECT r.id, r.libelle, r.module FROM ".MAIN_DB_PREFIX."rights_def as r, ".MAIN_DB_PREFIX."user_rights as ur";
- $sql .= " WHERE ur.fk_id = r.id AND ur.fk_user = ".$fuser->id. " ORDER BY r.module, r.id ASC";
- $var = True;
- $result=$db->query($sql);
-
- if ($result)
- {
- $num = $db->num_rows();
- $i = 0;
- while ($i < $num)
- {
- $obj = $db->fetch_object($i);
- if ($oldmod <> $obj->module)
- {
- $oldmod = $obj->module;
- $var = !$var;
- }
-
- print "";
- print " | id."&action=perms&subaction=delrights&rights=".$obj->id."\">".img_edit_remove()." | \n";
- print " ".$obj->libelle . " | ".$obj->module . " | \n";
- print " ";
- $i++;
- }
- }
- else
- {
- dolibarr_print_error($db);
- }
- print ' ';
- print ' |
';
- }
-
-
- if ($_GET["action"] != 'perms' && $_GET["action"] != 'edit')
+ if ($_GET["action"] != 'edit')
{
/*
* Fiche en mode visu