forked from Wavyzz/dolibarr
New: Task #10725
This commit is contained in:
@@ -41,6 +41,8 @@ $canadduser=($user->admin || $user->rights->user->user->creer);
|
||||
$canreaduser=($user->admin || $user->rights->user->user->lire);
|
||||
$canedituser=($user->admin || $user->rights->user->user->creer);
|
||||
$candisableuser=($user->admin || $user->rights->user->user->supprimer);
|
||||
$canreadgroup=($user->admin || $user->rights->user->group->read);
|
||||
$caneditgroup=($user->admin || $user->rights->user->group->write);
|
||||
// Define value to know what current user can do on properties of edited user
|
||||
if ($_GET["id"])
|
||||
{
|
||||
@@ -1174,6 +1176,8 @@ else
|
||||
* Liste des groupes dans lequel est l'utilisateur
|
||||
*/
|
||||
|
||||
if ($canreadgroup)
|
||||
{
|
||||
print_fiche_titre($langs->trans("ListOfGroupsForUser"),'','');
|
||||
|
||||
// On selectionne les groups
|
||||
@@ -1224,7 +1228,6 @@ else
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
|
||||
$uss[$obj->rowid] = $obj->nom;
|
||||
$i++;
|
||||
}
|
||||
@@ -1260,7 +1263,7 @@ else
|
||||
}
|
||||
$db->free($resql);
|
||||
|
||||
if ($canedituser)
|
||||
if ($caneditgroup)
|
||||
{
|
||||
$form = new Form($db);
|
||||
print '<form action="fiche.php?id='.$_GET["id"].'" method="post">'."\n";
|
||||
@@ -1302,7 +1305,7 @@ else
|
||||
|
||||
print "<tr ".$bc[$var].">";
|
||||
print '<td>';
|
||||
if ($canreaduser)
|
||||
if ($caneditgroup)
|
||||
{
|
||||
print '<a href="'.DOL_URL_ROOT.'/user/group/fiche.php?id='.$group->id.'">'.img_object($langs->trans("ShowGroup"),"group").' '.$group->nom.'</a>';
|
||||
}
|
||||
@@ -1313,7 +1316,7 @@ else
|
||||
print '</td>';
|
||||
print '<td align="right">';
|
||||
|
||||
if ($canedituser)
|
||||
if ($caneditgroup)
|
||||
{
|
||||
print '<a href="fiche.php?id='.$_GET["id"].'&action=removegroup&group='.$group->id.'">';
|
||||
print img_delete($langs->trans("RemoveFromGroup"));
|
||||
@@ -1334,6 +1337,8 @@ else
|
||||
print "</table>";
|
||||
print "<br>";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Fiche en mode edition
|
||||
|
||||
Reference in New Issue
Block a user