From 83ff60a131d68de5e007170d72dff1b2997f045e Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Wed, 16 Aug 2023 10:44:01 +0200 Subject: [PATCH] fix: use of getDolGlobal in module builder template --- htdocs/modulebuilder/template/class/myobject.class.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/modulebuilder/template/class/myobject.class.php b/htdocs/modulebuilder/template/class/myobject.class.php index 57358e2d110..eca483f0c8b 100644 --- a/htdocs/modulebuilder/template/class/myobject.class.php +++ b/htdocs/modulebuilder/template/class/myobject.class.php @@ -740,12 +740,13 @@ class MyObject extends CommonObject return 0; } - if (! ((getDolGlobalInt('MAIN_USE_ADVANCED_PERMS') && !empty($user->rights->mymodule->write)) - || (getDolGlobalInt('MAIN_USE_ADVANCED_PERMS') && !empty($user->rights->mymodule->mymodule_advance->validate)))) + /*if (! ((!getDolGlobalInt('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('mymodule','write')) + || (getDolGlobalInt('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('mymodule','mymodule_advance','validate')))) { $this->error='Permission denied'; return -1; - } + }*/ + return $this->setStatusCommon($user, self::STATUS_VALIDATED, $notrigger, 'MYOBJECT_REOPEN'); }