NEW: Multicurrency REST API to create, update, delete, update rate...

- Add permissions for currencies and their rates
- Fix invalid SQL syntax in Currency update request
This commit is contained in:
Alexandre Boin
2023-04-20 17:32:22 +02:00
parent eccb61e95d
commit 9fc4055af3
4 changed files with 280 additions and 4 deletions

View File

@@ -156,6 +156,30 @@ class modMultiCurrency extends DolibarrModules
// $this->rights[$r][5] = 'level2'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)
// $r++;
$this->rights[$r][0] = 40001;
$this->rights[$r][1] = 'Read currencies and their rates';
$this->rights[$r][2] = 'r';
$this->rights[$r][3] = 1;
$this->rights[$r][4] = 'currency';
$this->rights[$r][5] = 'read';
$r++;
$this->rights[$r][0] = 40002;
$this->rights[$r][1] = 'Create/Update currencies and their rates';
$this->rights[$r][2] = 'w';
$this->rights[$r][3] = 0;
$this->rights[$r][4] = 'currency';
$this->rights[$r][5] = 'write';
$r++;
$this->rights[$r][0] = 40003;
$this->rights[$r][1] = 'Delete currencies and their rates';
$this->rights[$r][2] = 'w';
$this->rights[$r][3] = 0;
$this->rights[$r][4] = 'currency';
$this->rights[$r][5] = 'delete';
$r++;
// Main menu entries
$this->menu = array(); // List of menus to add
$r = 0;