From 46aa01aea0cfafcb435f3c71ced044b2247e9813 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 20 Mar 2021 19:15:15 +0100 Subject: [PATCH] Fix permission on export of BOM and website --- htdocs/core/modules/modBom.class.php | 1 + htdocs/core/modules/modWebsite.class.php | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/htdocs/core/modules/modBom.class.php b/htdocs/core/modules/modBom.class.php index b040e4cec99..1c12b6c9f45 100644 --- a/htdocs/core/modules/modBom.class.php +++ b/htdocs/core/modules/modBom.class.php @@ -286,6 +286,7 @@ class modBom extends DolibarrModules $langs->load("mrp"); $this->export_code[$r] = $this->rights_class.'_'.$r; $this->export_label[$r] = 'BomAndBomLines'; // Translation key (used only if key ExportDataset_xxx_z not found) + $this->export_permission[$r] = array(array("bom", "read")); $this->export_icon[$r] = 'bom'; $keyforclass = 'BOM'; $keyforclassfile = '/bom/class/bom.class.php'; diff --git a/htdocs/core/modules/modWebsite.class.php b/htdocs/core/modules/modWebsite.class.php index f16a29728be..1d53ee4e15a 100644 --- a/htdocs/core/modules/modWebsite.class.php +++ b/htdocs/core/modules/modWebsite.class.php @@ -109,6 +109,12 @@ class modWebsite extends DolibarrModules $this->rights[$r][4] = 'delete'; $r++; + $this->rights[$r][0] = 10008; + $this->rights[$r][1] = 'Export website content'; + $this->rights[$r][3] = 0; + $this->rights[$r][4] = 'export'; + $r++; + // Main menu entries $r = 0; $this->menu[$r] = array('fk_menu'=>'0', // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode @@ -130,6 +136,7 @@ class modWebsite extends DolibarrModules $this->export_code[$r] = $this->rights_class.'_'.$r; $this->export_label[$r] = 'MyWebsitePages'; // Translation key (used only if key ExportDataset_xxx_z not found) + $this->export_permission[$r] = array(array("website", "export")); $this->export_icon[$r] = 'globe'; $keyforclass = 'WebsitePage'; $keyforclassfile = '/website/class/websitepage.class.php';