FIX #yogosha5753

This commit is contained in:
Laurent Destailleur 2021-04-01 10:08:05 +02:00
parent 9c92dfd3e1
commit 4b35645920
2 changed files with 7 additions and 7 deletions

View File

@ -53,7 +53,7 @@ $result = restrictedArea($user, 'societe', $id, '&societe', '', 'fk_soc', 'rowid
* Actions
*/
if ($action == 'setpricelevel') {
if ($action == 'setpricelevel' && $user->rights->societe->creer) {
$soc = new Societe($db);
$soc->fetch($id);
$soc->setPriceLevel(GETPOST("price_level"), $user);

View File

@ -62,7 +62,7 @@ if (GETPOST('cancel', 'alpha') && !empty($backtopage)) {
exit;
}
if ($action == 'confirm_split' && GETPOST("confirm", "alpha") == 'yes') {
if ($action == 'confirm_split' && GETPOST("confirm", "alpha") == 'yes' && $user->rights->societe->creer) {
//if ($user->rights->societe->creer)
//if ($user->rights->facture->creer)
@ -192,7 +192,7 @@ if ($action == 'setremise' && $user->rights->societe->creer) {
}
}
if (GETPOST('action', 'aZ09') == 'confirm_remove' && GETPOST("confirm") == 'yes') {
if (GETPOST('action', 'aZ09') == 'confirm_remove' && GETPOST("confirm") == 'yes' && $user->rights->societe->creer) {
//if ($user->rights->societe->creer)
//if ($user->rights->facture->creer)
@ -487,8 +487,8 @@ if ($socid > 0) {
print '</td>';
if ($user->rights->societe->creer || $user->rights->facture->creer) {
print '<td class="center nowrap">';
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=split&remid='.$obj->rowid.($backtopage ? '&backtopage='.urlencode($backtopage) : '').'">'.img_split($langs->trans("SplitDiscount")).'</a>';
print '<a class="reposition marginleftonly" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=remove&remid='.$obj->rowid.($backtopage ? '&backtopage='.urlencode($backtopage) : '').'">'.img_delete($langs->trans("RemoveDiscount")).'</a>';
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=split&token='.newToken().'&remid='.$obj->rowid.($backtopage ? '&backtopage='.urlencode($backtopage) : '').'">'.img_split($langs->trans("SplitDiscount")).'</a>';
print '<a class="reposition marginleftonly" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=remove&token='.newToken().'&remid='.$obj->rowid.($backtopage ? '&backtopage='.urlencode($backtopage) : '').'">'.img_delete($langs->trans("RemoveDiscount")).'</a>';
print '</td>';
} else {
print '<td>&nbsp;</td>';
@ -626,8 +626,8 @@ if ($socid > 0) {
print '</td>';
if ($user->rights->societe->creer || $user->rights->facture->creer) {
print '<td class="center nowrap">';
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=split&remid='.$obj->rowid.($backtopage ? '&backtopage='.urlencode($backtopage) : '').'">'.img_split($langs->trans("SplitDiscount")).'</a>';
print '<a class="reposition marginleftonly" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=remove&remid='.$obj->rowid.($backtopage ? '&backtopage='.urlencode($backtopage) : '').'">'.img_delete($langs->trans("RemoveDiscount")).'</a>';
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=split&token='.newToken().'&remid='.$obj->rowid.($backtopage ? '&backtopage='.urlencode($backtopage) : '').'">'.img_split($langs->trans("SplitDiscount")).'</a>';
print '<a class="reposition marginleftonly" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=remove&token='.newToken().'&remid='.$obj->rowid.($backtopage ? '&backtopage='.urlencode($backtopage) : '').'">'.img_delete($langs->trans("RemoveDiscount")).'</a>';
print '</td>';
} else {
print '<td>&nbsp;</td>';