Merge pull request #2801 from FHenry/3.6

FIX : [ bug #1926 ] [contract] Wrong Rights Checked
This commit is contained in:
Juanjo Menent 2015-05-07 20:21:05 +02:00
commit b7228e191c

View File

@ -1137,7 +1137,7 @@ else
$value = isset($_POST ["options_" . $key]) ? dol_mktime($_POST ["options_" . $key . "hour"], $_POST ["options_" . $key . "min"], 0, $_POST ["options_" . $key . "month"], $_POST ["options_" . $key . "day"], $_POST ["options_" . $key . "year"]) : $db->jdate($object->array_options ['options_' . $key]);
}
if ($action == 'edit_extras' && $user->rights->commande->creer && GETPOST('attribute') == $key) {
if ($action == 'edit_extras' && $user->rights->contrat->creer && GETPOST('attribute') == $key) {
print '<form enctype="multipart/form-data" action="' . $_SERVER["PHP_SELF"] . '" method="post" name="formcontract">';
print '<input type="hidden" name="action" value="update_extras">';
print '<input type="hidden" name="attribute" value="' . $key . '">';
@ -1150,7 +1150,7 @@ else
print '</form>';
} else {
print $extrafields->showOutputField($key, $value);
if ($object->statut == 0 && $user->rights->commande->creer)
if ($object->statut == 0 && $user->rights->contrat->creer)
print '<a href="' . $_SERVER['PHP_SELF'] . '?id=' . $object->id . '&action=edit_extras&attribute=' . $key . '">' . img_picto('', 'edit') . ' ' . $langs->trans('Modify') . '</a>';
}
print '</td></tr>' . "\n";