Skip to content
Snippets Groups Projects
Commit 88aa5514 authored by Rodolphe Quiedeville's avatar Rodolphe Quiedeville
Browse files

Modif permissions

parent 65874a97
No related branches found
No related tags found
No related merge requests found
......@@ -519,7 +519,6 @@ else
if (!$client_comm->perm_read)
{
print decoct($client_comm->id);
print "Lecture non authorise";
}
......@@ -537,9 +536,12 @@ else
if ($ligne->statut == -1)
{
$head[$h][0] = DOL_URL_ROOT."/telephonie/ligne/commande.php?id=".$ligne->id;
$head[$h][1] = $langs->trans('Commande');
$h++;
if ($user->rights->telephonie->ligne->creer)
{
$head[$h][0] = DOL_URL_ROOT."/telephonie/ligne/commande.php?id=".$ligne->id;
$head[$h][1] = $langs->trans('Commande');
$h++;
}
}
else
{
......
......@@ -37,17 +37,25 @@ if ($cancel == $langs->trans("Cancel"))
if ($_GET["id"])
{
$ligne = new LigneTel($db);
$ligne = new LigneTel($db);
$result = $ligne->fetch_by_id($_GET["id"]);
}
if ( $result )
if ($result == 1)
{
$client_comm = new Societe($db);
$client_comm->fetch($ligne->client_comm_id, $user);
}
if (!$client_comm->perm_read)
{
print "Lecture non authorise";
}
if ($result == 1 && $client_comm->perm_read)
{
if ($_GET["action"] <> 'edit' && $_GET["action"] <> 're-edit')
{
$h=0;
$head[$h][0] = DOL_URL_ROOT."/telephonie/ligne/fiche.php?id=".$ligne->id;
$head[$h][1] = $langs->trans("Ligne");
......@@ -58,7 +66,6 @@ if ( $result )
$hselected=$h;
$h++;
dolibarr_fiche_head($head, $hselected, 'Ligne : '.$ligne->numero);
print_fiche_titre('Fiche Ligne', $mesg);
......@@ -70,9 +77,6 @@ if ( $result )
$client = new Societe($db, $ligne->client_id);
$client->fetch($ligne->client_id);
$client_comm = new Societe($db, $ligne->client_comm_id);
$client_comm->fetch($ligne->client_comm_id);
print '<tr><td width="20%">Client</td><td colspan="2">';
print '<a href="'.DOL_URL_ROOT.'/telephonie/client/fiche.php?id='.$client_comm->id.'">';
print $client_comm->nom.'</a></td></tr>';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment