From cd88c7ad74197946439a34b852856399aa4a4e24 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 26 Mar 2021 12:17:18 +0100 Subject: [PATCH] Position of permission --- htdocs/user/notify/card.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/user/notify/card.php b/htdocs/user/notify/card.php index 228bbd7882e..0c9785d7463 100644 --- a/htdocs/user/notify/card.php +++ b/htdocs/user/notify/card.php @@ -40,12 +40,6 @@ $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); $actionid = GETPOST('actionid'); -// Security check -if ($user->socid) { - $id = $user->socid; -} -$result = restrictedArea($user, 'societe', '', ''); - $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; $sortfield = GETPOST("sortfield", 'alpha'); $sortorder = GETPOST("sortorder", 'alpha'); @@ -74,6 +68,12 @@ if ($id > 0 || !empty($ref)) { $permissiontoadd = (($object->id == $user->id) || (!empty($user->rights->user->user->lire))); +// Security check +if ($user->socid) { + $id = $user->socid; +} +$result = restrictedArea($user, 'user', '', ''); + /* * Actions