Fix: Pb droits

This commit is contained in:
Laurent Destailleur 2007-05-16 12:03:55 +00:00
parent 09541f3a0e
commit e946c8e585

View File

@ -197,9 +197,6 @@ if ($action == 'create')
/* ************************************************************************** */ /* ************************************************************************** */
else else
{ {
if ($message) { print $message."<br>"; }
if ($_GET["id"] ) if ($_GET["id"] )
{ {
$group = new UserGroup($db); $group = new UserGroup($db);
@ -227,7 +224,7 @@ else
* Fiche en mode visu * Fiche en mode visu
*/ */
if ($_GET["action"] != 'edit') if ($action != 'edit')
{ {
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';
@ -244,11 +241,8 @@ else
print '</div>'; print '</div>';
if ($message) { print $message; }
/* /*
* Barre d'actions * Barre d'actions
*
*/ */
print '<div class="tabsAction">'; print '<div class="tabsAction">';
@ -265,6 +259,9 @@ else
print "</div>\n"; print "</div>\n";
print "<br>\n"; print "<br>\n";
if ($message) { print $message."<br>"; }
/* /*
* Liste des utilisateurs dans le groupe * Liste des utilisateurs dans le groupe
@ -300,7 +297,7 @@ else
dolibarr_print_error($db); dolibarr_print_error($db);
} }
if ($user->admin) if ($caneditperms)
{ {
$form = new Form($db); $form = new Form($db);
print '<form action="fiche.php?id='.$group->id.'" method="post">'."\n"; print '<form action="fiche.php?id='.$group->id.'" method="post">'."\n";
@ -314,6 +311,7 @@ else
print '<input type="submit" class=button value="'.$langs->trans("Add").'">'; print '<input type="submit" class=button value="'.$langs->trans("Add").'">';
print '</td></tr>'."\n"; print '</td></tr>'."\n";
print '</table></form>'."\n"; print '</table></form>'."\n";
print '<br>';
} }
/* /*
@ -332,8 +330,6 @@ else
$num = $db->num_rows($result); $num = $db->num_rows($result);
$i = 0; $i = 0;
print '<br>';
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td width="25%">'.$langs->trans("Login").'</td>'; print '<td width="25%">'.$langs->trans("Login").'</td>';
@ -387,7 +383,7 @@ else
/* /*
* Fiche en mode edition * Fiche en mode edition
*/ */
if ($_GET["action"] == 'edit' && $user->admin) if ($_GET["action"] == 'edit' && $caneditperms)
{ {
print '<form action="fiche.php?id='.$group->id.'" method="post" name="updategroup" enctype="multipart/form-data">'; print '<form action="fiche.php?id='.$group->id.'" method="post" name="updategroup" enctype="multipart/form-data">';
print '<input type="hidden" name="action" value="update">'; print '<input type="hidden" name="action" value="update">';