Skip to content

Commit

Permalink
Fix: bad rights
Browse files Browse the repository at this point in the history
  • Loading branch information
hregis committed Feb 20, 2012
1 parent 47eaaf5 commit cd23f8a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
7 changes: 4 additions & 3 deletions htdocs/core/ajax/loadinplace.php
Expand Up @@ -63,9 +63,10 @@
if ($element == 'propal') $element = 'propale';
else if ($element == 'fichinter') $element = 'ficheinter';

if (($element == 'payment' && $user->rights->facture->paiement)
|| $user->rights->$element->lire || $user->rights->$element->read
|| $user->rights->$element->$subelement->lire || $user->rights->$element->$subelement->read)
if ($user->rights->$element->lire || $user->rights->$element->read
|| $user->rights->$element->$subelement->lire || $user->rights->$element->$subelement->read
|| ($element == 'payment' && $user->rights->facture->lire)
|| ($element == 'payment_supplier' && $user->rights->fournisseur->facture->lire))
{
if ($type == 'select')
{
Expand Down
7 changes: 4 additions & 3 deletions htdocs/core/ajax/saveinplace.php
Expand Up @@ -69,9 +69,10 @@
if ($element == 'propal') $element = 'propale';
else if ($element == 'fichinter') $element = 'ficheinter';

if (($element == 'payment' && $user->rights->facture->paiement)
|| $user->rights->$element->creer || $user->rights->$element->write
|| $user->rights->$element->$subelement->creer || $user->rights->$element->$subelement->write)
if ($user->rights->$element->creer || $user->rights->$element->write
|| $user->rights->$element->$subelement->creer || $user->rights->$element->$subelement->write
|| ($element == 'payment' && $user->rights->facture->paiement)
|| ($element == 'payment_supplier' && $user->rights->fournisseur->facture->creer))
{
// Clean parameters
$newvalue = trim($value);
Expand Down

0 comments on commit cd23f8a

Please sign in to comment.