From 7f3c8b4cd5ef262cf762121d082345a111517f0a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 15 Jun 2021 13:54:52 +0200 Subject: [PATCH] Fix user can't edit record --- htdocs/user/document.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/user/document.php b/htdocs/user/document.php index 8cf6c2b2a81..a5d88d04c5d 100644 --- a/htdocs/user/document.php +++ b/htdocs/user/document.php @@ -60,6 +60,9 @@ if ($id) { || (($user->id != $id) && $user->rights->user->user->password)); } +$permissiontoadd = $caneditfield; +$permtoedit = $caneditfield; + // Security check $socid = 0; if ($user->socid > 0) { @@ -174,10 +177,7 @@ if ($object->id) { print dol_get_fiche_end(); - $modulepart = 'user'; - $permissiontoadd = $user->rights->user->user->creer; - $permtoedit = $user->rights->user->user->creer; $param = '&id='.$object->id; include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; } else {