fix: use of getDolGlobal in module builder template

This commit is contained in:
Florian HENRY
2023-08-16 10:44:01 +02:00
parent 4a453d0805
commit 83ff60a131

View File

@@ -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');
}