NEW Move right from advance to normal for thirdparty information payment page (#33885)d

Co-authored-by: Alexandre SPANGARO <aspangaro.dolibarr@gmail.com>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
This commit is contained in:
ThomasNgr-OpenDSI 2025-04-26 21:23:08 +02:00 committed by GitHub
parent 9873a98c36
commit 149bb14202
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 6 additions and 8 deletions

View file

@ -203,7 +203,7 @@ class modSociete extends DolibarrModules
$this->rights[$r][0] = 130;
$this->rights[$r][1] = 'Modify thirdparty information payment';
$this->rights[$r][3] = 0;
$this->rights[$r][4] = 'thirdparty_paymentinformation_advance'; // Visible if option MAIN_USE_ADVANCED_PERMS is on
$this->rights[$r][4] = 'thirdparty_paymentinformation';
$this->rights[$r][5] = 'write';
// 262 : Restrict access to sales representative
@ -456,11 +456,7 @@ class modSociete extends DolibarrModules
$this->export_code[$r] = $this->rights_class.'_'.$r;
$this->export_label[$r] = 'ExportDataset_company_3';
$this->export_icon[$r] = 'account';
if (getDolGlobalString('MAIN_USE_ADVANCED_PERMS')) {
$this->export_permission[$r] = array(array("societe", "export"), array("societe", "thirdparty_paymentinformation_advance", "write"));
} else {
$this->export_permission[$r] = array(array("societe", "export"));
}
$this->export_permission[$r] = array(array("societe", "export"));
$this->export_fields_array[$r] = array(
'b.rowid' => "IdPaymentMode",
'b.fk_soc' => "ThirdPartyName",

View file

@ -276,6 +276,9 @@ CREATE TABLE llx_webhook_history(
ALTER TABLE llx_societe_rib ADD COLUMN cci varchar(100) after iban_prefix; -- Interbank code for some countries like Chile
-- Move permission thirdparty_paymentinformation out of advanced rights
UPDATE llx_rights_def SET perms = 'thirdparty_paymentinformation' WHERE perms = 'thirdparty_paymentinformation_advance';
ALTER TABLE llx_eventorganization_conferenceorboothattendee DROP INDEX idx_eventorganization_conferenceorboothattendee_ref;
ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD UNIQUE INDEX uk_eventorganization_confboothattendee(ref);

View file

@ -91,8 +91,7 @@ $hookmanager->initHooks(array('thirdpartybancard', 'globalcard'));
$permissiontoread = $user->hasRight('societe', 'lire');
$permissiontoadd = $user->hasRight('societe', 'creer'); // Used by the include of actions_addupdatedelete.inc.php and actions_builddoc.inc.php
$permissiontoaddupdatepaymentinformation = ((!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $permissiontoadd) || (getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('societe', 'thirdparty_paymentinformation_advance', 'write')));
$permissiontoaddupdatepaymentinformation = $user->hasRight('societe', 'thirdparty_paymentinformation_advance', 'write');
// Check permission on company
$result = restrictedArea($user, 'societe', '', '');