diff --git a/htdocs/modulebuilder/template/myobject_document.php b/htdocs/modulebuilder/template/myobject_document.php index d1040364182..aa213461e24 100644 --- a/htdocs/modulebuilder/template/myobject_document.php +++ b/htdocs/modulebuilder/template/myobject_document.php @@ -132,7 +132,7 @@ if ($enablepermissioncheck) { $permissiontoadd = $user->rights->mymodule->myobject->write; // Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles.inc.php } else { $permissiontoread = 1; - $permission = 1; + $permissiontoadd = 1; } // Security check (enable the most restrictive one)