Skip to content
Snippets Groups Projects
Commit 9693982f authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Merge pull request #4002 from marcosgdf/bug-3997

FIX #3997 Wrong permission key used for Margins > Read all
parents d16efbaf 73da0114
No related branches found
No related tags found
No related merge requests found
...@@ -36,7 +36,7 @@ $langs->load("margins"); ...@@ -36,7 +36,7 @@ $langs->load("margins");
// Security check // Security check
if ($user->rights->margin->read->all) { if ($user->rights->margins->read->all) {
$agentid = GETPOST('agentid', 'int'); $agentid = GETPOST('agentid', 'int');
} else { } else {
$agentid = $user->id; $agentid = $user->id;
...@@ -91,7 +91,7 @@ dol_fiche_head($head, 'agentMargins', $titre, 0, $picto); ...@@ -91,7 +91,7 @@ dol_fiche_head($head, 'agentMargins', $titre, 0, $picto);
print '<form method="post" name="sel" action="'.$_SERVER['PHP_SELF'].'">'; print '<form method="post" name="sel" action="'.$_SERVER['PHP_SELF'].'">';
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';
if ($user->rights->margin->read->all) { if ($user->rights->margins->read->all) {
print '<tr><td width="20%">'.$langs->trans('SalesRepresentative').'</td>'; print '<tr><td width="20%">'.$langs->trans('SalesRepresentative').'</td>';
print '<td colspan="4">'; print '<td colspan="4">';
print $form->select_dolusers($agentid, 'agentid', 1); print $form->select_dolusers($agentid, 'agentid', 1);
......
...@@ -77,7 +77,7 @@ function marges_prepare_head() ...@@ -77,7 +77,7 @@ function marges_prepare_head()
$h++; $h++;
} }
if ($user->rights->margin->read->all) { if ($user->rights->margins->read->all) {
$title = 'UserMargins'; $title = 'UserMargins';
} else { } else {
$title = 'SalesRepresentativeMargins'; $title = 'SalesRepresentativeMargins';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment