FIX Updated rights management in ModuleBuilder Tabs (#34989)

* Update modMyModule.class.php

Actualisation de la gestion des droits dans les Tabs du ModuleBuilder

* Update modMyModule.class.php

* Update modMyModule.class.php

* Update modMyModule.class.php

* Update modMyModule.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
This commit is contained in:
Kusco
2025-08-20 17:02:09 +02:00
committed by GitHub
parent 55a4b23217
commit 8075cb8dba

View File

@@ -188,13 +188,14 @@ class modMyModule extends DolibarrModules
// Array to add new pages in new tabs
/* BEGIN MODULEBUILDER TABS */
// Don't forget to deactivate/reactivate your module to test your changes
$this->tabs = array();
/* END MODULEBUILDER TABS */
// Example:
// To add a new tab identified by code tabname1
// $this->tabs[] = array('data' => 'objecttype:+tabname1:Title1:mylangfile@mymodule:$user->hasRight(\'mymodule\', \'read\'):/mymodule/mynewtab1.php?id=__ID__');
// $this->tabs[] = array('data' => 'objecttype:+tabname1:Title1:mylangfile@mymodule:$user->hasRight('mymodule', 'myobject', 'read'):/mymodule/mynewtab1.php?id=__ID__');
// To add another new tab identified by code tabname2. Label will be result of calling all substitution functions on 'Title2' key.
// $this->tabs[] = array('data' => 'objecttype:+tabname2:SUBSTITUTION_Title2:mylangfile@mymodule:$user->hasRight(\'othermodule\', \'read\'):/mymodule/mynewtab2.php?id=__ID__',
// $this->tabs[] = array('data' => 'objecttype:+tabname2:SUBSTITUTION_Title2:mylangfile@mymodule:$user->hasRight('othermodule', 'otherobject', 'read'):/mymodule/mynewtab2.php?id=__ID__',
// To remove an existing tab identified by code tabname
// $this->tabs[] = array('data' => 'objecttype:-tabname:NU:conditiontoremove');
//