Qual: Move unvalidate permission as an advanced permission to keep list of permission for a default usage uniform between modules.
This commit is contained in:
parent
fc409cf315
commit
73afd45d1a
@ -340,7 +340,7 @@ if ($action == 'confirm_valid' && $confirm == 'yes' && $user->rights->facture->v
|
||||
}
|
||||
|
||||
// Repasse la facture en mode brouillon (unvalidate)
|
||||
if ($action == 'modif' && $user->rights->facture->unvalidate)
|
||||
if ($action == 'modif' && ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->rights->facture->valider) || $user->rights->facture->invoice_advance->unvalidate))
|
||||
{
|
||||
$object->fetch($id);
|
||||
$object->fetch_thirdparty();
|
||||
@ -2580,7 +2580,7 @@ else
|
||||
{
|
||||
if (! $objectidnext)
|
||||
{
|
||||
if ($user->rights->facture->unvalidate)
|
||||
if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->rights->facture->valider) || $user->rights->facture->invoice_advance->unvalidate)
|
||||
{
|
||||
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?facid='.$object->id.'&action=modif">'.$langs->trans('Modify').'</a>';
|
||||
}
|
||||
|
||||
@ -131,7 +131,8 @@ class modFacture extends DolibarrModules
|
||||
$this->rights[$r][1] = 'Dévalider les factures';
|
||||
$this->rights[$r][2] = 'a';
|
||||
$this->rights[$r][3] = 0;
|
||||
$this->rights[$r][4] = 'unvalidate';
|
||||
$this->rights[$r][4] = 'invoice_advance';
|
||||
$this->rights[$r][5] = 'unvalidate';
|
||||
|
||||
$r++;
|
||||
$this->rights[$r][0] = 14;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user