mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
FIX #3997 Wrong permission key used for Margins > Read all
This commit is contained in:
parent
43f3999234
commit
73da011461
|
|
@ -36,7 +36,7 @@ $langs->load("margins");
|
|||
|
||||
// Security check
|
||||
|
||||
if ($user->rights->margin->read->all) {
|
||||
if ($user->rights->margins->read->all) {
|
||||
$agentid = GETPOST('agentid', 'int');
|
||||
} else {
|
||||
$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 '<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 '<td colspan="4">';
|
||||
print $form->select_dolusers($agentid, 'agentid', 1);
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ function marges_prepare_head()
|
|||
$h++;
|
||||
}
|
||||
|
||||
if ($user->rights->margin->read->all) {
|
||||
if ($user->rights->margins->read->all) {
|
||||
$title = 'UserMargins';
|
||||
} else {
|
||||
$title = 'SalesRepresentativeMargins';
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user