Dolibarr ERP & CRM » Bugs » bug #1926 [contract] Wrong Rights CheckedDernières modifications
Répondre
État Détails |
Last Modified On: | 07/05/2015 17:39 | | Submitted by: | damien clochard (daamien) |
Submitted on: | 06/05/2015 12:42 | |
Summary: | [contract] Wrong Rights Checked |
Description: | Version 3.6, in contrat/fiche.php
Line 1140 is wrong :
if ($action == 'edit_extras' && $user->rights->commande->creer && GETPOST('attribute') == $key) {
the "commande->creer" right is checked but it should be "contract->creer" or "contrat->creer"
and also line 1153 :
if ($object->statut == 0 && $user->rights->commande->creer)
Again the "commande->creer" right is checked
And the statut check is not correct too : user should able to modify teh extra fields even if the contract is not in statut 'brouillon'
|
Step to reproduce bug: | |
Detected in version: | 3.6.2 | | Category: | Module: Contracts |
Severity: | 5 - Major | | OS Type/Version: | |
PHP version: | | | Database type and version: | |
Etat |
Status: | Open | | Assigned to: | HENRY Florian (fhenry) |
Resolution: | Fixed | |
Commentaires- HENRY Florian 07/05/2015 17:53
- C'est la même chose sur tout les extrafields (propale, commande, facture) si je ne me trompe pas. A partir de la 3.7, il y a une option sur les extrafields "Toujours modifiable" qui permet de modifier ce comportement.
- damien clochard 07/05/2015 17:39
merci pour le patch mais pour moi ça ne traite pas la question du second test :
En fait, je ne comprend pas l'intérêt de $object->statut == 0 ....
on doit pouvoir modifier les extrafields meme quand un contrat n'est plus en brouillon... Ou alors le sens sur champ statut m'échappe ?- HENRY Florian 07/05/2015 17:26
- https://github.com/Dolibarr/dolibarr/pull/2801
|
|