Merge pull request #4002 from marcosgdf/bug-3997
FIX #3997 Wrong permission key used for Margins > Read all
This commit is contained in:
commit
9693982f27
@ -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);
|
|||||||
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()
|
|||||||
$h++;
|
$h++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($user->rights->margin->read->all) {
|
if ($user->rights->margins->read->all) {
|
||||||
$title = 'UserMargins';
|
$title = 'UserMargins';
|
||||||
} else {
|
} else {
|
||||||
$title = 'SalesRepresentativeMargins';
|
$title = 'SalesRepresentativeMargins';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user